Skip to content

Commit dd803bc

Browse files
committed
fixes clang and gcc misleading indentation warnings
replace tabs with spaces; another cause of misleading indentation change back change back change back
1 parent 51f8a47 commit dd803bc

File tree

7 files changed

+32
-36
lines changed

7 files changed

+32
-36
lines changed

src/osg/Texture2DArray.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -372,10 +372,10 @@ void Texture2DArray::apply(State& state) const
372372
}
373373
else
374374
{
375-
// Override compressed source format with safe GL_RGBA value which not generate error
376-
// We can safely do this as source format is not important when source data is NULL
377-
if( isCompressedInternalFormat( sourceFormat ) )
378-
sourceFormat = GL_RGBA;
375+
// Override compressed source format with safe GL_RGBA value which not generate error
376+
// We can safely do this as source format is not important when source data is NULL
377+
if( isCompressedInternalFormat( sourceFormat ) )
378+
sourceFormat = GL_RGBA;
379379

380380
extensions->glTexImage3D( GL_TEXTURE_2D_ARRAY, 0, _internalFormat,
381381
_textureWidth, _textureHeight, textureDepth, _borderWidth,

src/osgPlugins/osc/osc/OscReceivedElements.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ static inline const char* FindStr4End( const char *p, const char *end )
6161
if( p >= end )
6262
return 0;
6363

64-
if( p[0] == '\0' ) // special case for SuperCollider integer address pattern
65-
return p + 4;
64+
if( p[0] == '\0' ) // special case for SuperCollider integer address pattern
65+
return p + 4;
6666

6767
p += 3;
6868
end -= 1;

src/osgPlugins/txp/trpage_material.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,19 +243,20 @@ bool trpgMatTable::Read(trpgReadBuffer &buf)
243243
buf.Get(nMat);
244244
if (nTable <= 0 || nMat < 0) throw 1;
245245
// Read the materials
246-
for (i=0;i<nTable;i++)
246+
for (i=0;i<nTable;i++) {
247247
for (j=0;j<nMat;j++) {
248-
buf.GetToken(matTok,len);
248+
buf.GetToken(matTok, len);
249249
if (matTok != TRPGMATERIAL) throw 1;
250250
buf.PushLimit(len);
251251
mat.Reset();
252252
status = mat.Read(buf);
253253
buf.PopLimit();
254254
if (!status) throw 1;
255-
AddMaterial(mat,false);
255+
AddMaterial(mat, false);
256256
}
257-
numTable += nTable;
258-
numMat = materialMap.size();
257+
}
258+
numTable += nTable;
259+
numMat = materialMap.size();
259260
}
260261
catch (...) {
261262
return false;

src/osgPlugins/zip/unzip.cpp

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3486,15 +3486,12 @@ int unzLocateFile (unzFile file, const char *szFileName, int iCaseSensitivity)
34863486
uLong pos_in_central_dirSaved;
34873487

34883488

3489-
if (file==NULL)
3490-
return UNZ_PARAMERROR;
3489+
if (file==NULL) return UNZ_PARAMERROR;
34913490

3492-
if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP)
3493-
return UNZ_PARAMERROR;
3491+
if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP) return UNZ_PARAMERROR;
34943492

34953493
s=(unz_s*)file;
3496-
if (!s->current_file_ok)
3497-
return UNZ_END_OF_LIST_OF_FILE;
3494+
if (!s->current_file_ok) return UNZ_END_OF_LIST_OF_FILE;
34983495

34993496
num_fileSaved = s->num_file;
35003497
pos_in_central_dirSaved = s->pos_in_central_dir;
@@ -3540,12 +3537,12 @@ int unzlocal_CheckCurrentFileCoherencyHeader (unz_s *s,uInt *piSizeVar,
35403537

35413538

35423539
if (err==UNZ_OK)
3543-
{
3540+
{
35443541
if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK)
35453542
err=UNZ_ERRNO;
35463543
else if (uMagic!=0x04034b50)
35473544
err=UNZ_BADZIPFILE;
3548-
}
3545+
}
35493546

35503547
if (unzlocal_getShort(s->file,&uData) != UNZ_OK)
35513548
err=UNZ_ERRNO;
@@ -3559,17 +3556,16 @@ int unzlocal_CheckCurrentFileCoherencyHeader (unz_s *s,uInt *piSizeVar,
35593556
else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method))
35603557
err=UNZ_BADZIPFILE;
35613558

3562-
if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) &&
3563-
(s->cur_file_info.compression_method!=Z_DEFLATED))
3564-
err=UNZ_BADZIPFILE;
3559+
if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) && (s->cur_file_info.compression_method!=Z_DEFLATED)) {
3560+
err = UNZ_BADZIPFILE;
3561+
}
35653562

35663563
if (unzlocal_getLong(s->file,&uData) != UNZ_OK) // date/time
35673564
err=UNZ_ERRNO;
35683565

35693566
if (unzlocal_getLong(s->file,&uData) != UNZ_OK) // crc
35703567
err=UNZ_ERRNO;
3571-
else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) &&
3572-
((uFlags & 8)==0))
3568+
else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) && ((uFlags & 8)==0))
35733569
err=UNZ_BADZIPFILE;
35743570

35753571
if (unzlocal_getLong(s->file,&uData) != UNZ_OK) // size compr
@@ -3625,8 +3621,9 @@ int unzOpenCurrentFile (unzFile file, const char *password)
36253621
if (!s->current_file_ok)
36263622
return UNZ_PARAMERROR;
36273623

3628-
if (s->pfile_in_zip_read != NULL)
3629-
unzCloseCurrentFile(file);
3624+
if (s->pfile_in_zip_read != NULL) {
3625+
unzCloseCurrentFile(file);
3626+
}
36303627

36313628
if (unzlocal_CheckCurrentFileCoherencyHeader(s,&iSizeVar,
36323629
&offset_local_extrafield,&size_local_extrafield)!=UNZ_OK)

src/osgText/Text.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ String::iterator Text::computeLastCharacterOnLine(osg::Vec2& cursor, String::ite
367367
return lastValidChar;
368368

369369
// Subtract off glyphs from the cursor position (to correctly center text)
370-
if(*prevChar != '-')
370+
if(*prevChar != '-')
371371
{
372372
Glyph* glyph = activefont->getGlyph(_fontSize, *prevChar);
373373
if (glyph)

src/osgText/Text3D.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ String::iterator Text3D::computeLastCharacterOnLine(osg::Vec2& cursor, String::i
207207
return lastValidChar;
208208

209209
// Subtract off glyphs from the cursor position (to correctly center text)
210-
if(*prevChar != '-')
210+
if(*prevChar != '-')
211211
{
212212
Glyph3D* glyph = _font->getGlyph3D(_fontSize, *prevChar);
213213
if (glyph)

src/osgViewer/DarwinUtils.mm

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,26 +43,24 @@ -(void) setDisplaySettings: (osg::DisplaySettings*) display_settings
4343
-(void) hide
4444
{
4545
if(_displaySettings.valid()) _menubarBehavior = _displaySettings->getOSXMenubarBehavior();
46-
47-
if (_menubarBehavior == osg::DisplaySettings::MENUBAR_FORCE_SHOW)
48-
return;
49-
46+
47+
if (_menubarBehavior == osg::DisplaySettings::MENUBAR_FORCE_SHOW) return;
48+
5049
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
5150
NSApplicationPresentationOptions options;
5251
switch(_menubarBehavior) {
5352
case osg::DisplaySettings::MENUBAR_AUTO_HIDE:
5453
options = NSApplicationPresentationAutoHideMenuBar | NSApplicationPresentationAutoHideDock;
5554
break;
56-
55+
5756
case osg::DisplaySettings::MENUBAR_FORCE_HIDE:
5857
options = NSApplicationPresentationHideMenuBar | NSApplicationPresentationHideDock;
5958
break;
60-
59+
6160
default:
6261
options = NSApplicationPresentationDefault;
63-
6462
}
65-
63+
6664
[[NSApplication sharedApplication] setPresentationOptions: options];
6765
#else
6866
SystemUIMode mode = kUIModeAllHidden;

0 commit comments

Comments
 (0)