Skip to content

Commit d1c75bb

Browse files
author
Bart Roossien
committed
refactor: remove redundant include guards after #pragma once
Automatically strip #ifndef/#define pairs and matching #endif that follow #pragma once in header files. Cleans up legacy patterns left from mixed guarding styles.
1 parent df6ebbd commit d1c75bb

File tree

1,290 files changed

+75
-5094
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,290 files changed

+75
-5094
lines changed

Core/GameEngine/Include/Common/ArchiveFile.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@
2828

2929
#pragma once
3030

31-
#ifndef __ARCHIVEFILE_H
32-
#define __ARCHIVEFILE_H
33-
3431
#include "Lib/BaseType.h"
3532
#include "Common/AsciiString.h"
3633
#include "Common/ArchiveFileSystem.h"
@@ -74,4 +71,3 @@ class ArchiveFile
7471
DetailedArchivedDirectoryInfo m_rootDirectory;
7572
};
7673

77-
#endif // __ARCHIVEFILE_H

Core/GameEngine/Include/Common/ArchiveFileSystem.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@
4343

4444
#pragma once
4545

46-
#ifndef __ARCHIVEFILESYSTEM_H_
47-
#define __ARCHIVEFILESYSTEM_H_
48-
4946
#define MUSIC_BIG "Music.big"
5047

5148
//----------------------------------------------------------------------------
@@ -181,4 +178,3 @@ extern ArchiveFileSystem *TheArchiveFileSystem;
181178
// Inlining
182179
//----------------------------------------------------------------------------
183180

184-
#endif // __ARCHIVEFILESYSTEM_H_

Core/GameEngine/Include/Common/AsciiString.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@
4545

4646
#pragma once
4747

48-
#ifndef ASCIISTRING_H
49-
#define ASCIISTRING_H
50-
5148
#include <stdarg.h>
5249
#include <stdio.h>
5350
#include <string.h>
@@ -600,4 +597,3 @@ inline Bool operator>=(const AsciiString& s1, const char* s2)
600597
return strcmp(s1.str(), s2) >= 0;
601598
}
602599

603-
#endif // ASCIISTRING_H

Core/GameEngine/Include/Common/AudioAffect.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
// Do not distribute
2828
#pragma once
2929

30-
#ifndef _AUDIOAFFECT_H_
31-
#define _AUDIOAFFECT_H_
32-
3330
#include <Lib/BaseType.h>
3431

3532
// if it is set by the options panel, use the system setting parameter. Otherwise, this will be
@@ -45,4 +42,3 @@ enum AudioAffect CPP_11(: Int)
4542
AudioAffect_SystemSetting = 0x10,
4643
};
4744

48-
#endif // _AUDIOAFFECT_H_

Core/GameEngine/Include/Common/AudioEventInfo.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
// Author: John K. McDonald, March 2002
2828

2929
#pragma once
30-
#ifndef _H_AUDIOEVENTINFO_
31-
#define _H_AUDIOEVENTINFO_
3230

3331
#include "Common/AsciiString.h"
3432
#include "Common/GameMemory.h"
@@ -136,4 +134,3 @@ struct AudioEventInfo : public MemoryPoolObject
136134
const FieldParse *getFieldParse( void ) const { return m_audioEventInfo; }
137135
};
138136

139-
#endif /* _H_AUDIOEVENTINFO_ */

Core/GameEngine/Include/Common/AudioEventRTS.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
// Author: John K. McDonald, March 2002
2828

2929
#pragma once
30-
#ifndef _H_AUDIOEVENTRTS_
31-
#define _H_AUDIOEVENTRTS_
3230

3331
#include "Common/AsciiString.h"
3432
#include "Common/GameAudio.h"
@@ -213,5 +211,4 @@ class DynamicAudioEventRTS : public MemoryPoolObject
213211
};
214212
EMPTY_DTOR(DynamicAudioEventRTS)
215213

216-
#endif /* _H_AUDIOEVENTRTS_ */
217214

Core/GameEngine/Include/Common/AudioHandleSpecialValues.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@
2828

2929
#pragma once
3030

31-
#ifndef _AUDIOHANDLESPECIALVALUES_H_
32-
#define _AUDIOHANDLESPECIALVALUES_H_
33-
3431
enum AudioHandleSpecialValues CPP_11(: Int)
3532
{
3633
AHSV_Error = 0x00,
@@ -42,4 +39,3 @@ enum AudioHandleSpecialValues CPP_11(: Int)
4239
AHSV_FirstHandle
4340
};
4441

45-
#endif // _AUDIOHANDLESPECIALVALUES_H_

Core/GameEngine/Include/Common/AudioRandomValue.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929

3030
#pragma once
3131

32-
#ifndef _AUDIO_RANDOM_VALUE_H_
33-
#define _AUDIO_RANDOM_VALUE_H_
34-
3532
#include "Lib/BaseType.h"
3633

3734
// do NOT use these functions directly, rather use the macros below
@@ -44,4 +41,3 @@ extern Real GetGameAudioRandomValueReal( Real lo, Real hi, const char *file, int
4441

4542
//--------------------------------------------------------------------------------------------------------------
4643

47-
#endif // _AUDIO_RANDOM_VALUE_H_

Core/GameEngine/Include/Common/AudioRequest.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@
2828

2929
#pragma once
3030

31-
#ifndef _AUDIOREQUEST_H_
32-
#define _AUDIOREQUEST_H_
33-
3431
#include "Common/GameAudio.h"
3532
#include "Common/GameMemory.h"
3633

@@ -58,4 +55,3 @@ struct AudioRequest : public MemoryPoolObject
5855
Bool m_requiresCheckForSample;
5956
};
6057

61-
#endif // _AUDIOREQUEST_H_

Core/GameEngine/Include/Common/AudioSettings.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@
2828

2929
#pragma once
3030

31-
#ifndef _AUDIOSETTINGS_H_
32-
#define _AUDIOSETTINGS_H_
33-
3431
#include "Common/AsciiString.h"
3532

3633
enum { MAX_HW_PROVIDERS = 4 };
@@ -104,4 +101,3 @@ struct AudioSettings
104101
Real m_zoomSoundVolumePercentageAmount; //The amount of sound volume dedicated to zooming.
105102
};
106103

107-
#endif // _AUDIOSETTINGS_H_

0 commit comments

Comments
 (0)