Skip to content

Commit 8bc8922

Browse files
chore: Prevent conflict between clang-format and pre-C++11 nested template parsing (#2760)
1 parent 78edd87 commit 8bc8922

48 files changed

Lines changed: 68 additions & 68 deletions

File tree

Some content is hidden

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

Core/GameEngine/Include/Common/FileSystem.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
// Type Defines
6464
//----------------------------------------------------------------------------
6565

66-
typedef std::set<AsciiString, rts::less_than_nocase<AsciiString> > FilenameList;
66+
typedef std::set<AsciiString, rts::less_than_nocase<AsciiString>/**/> FilenameList;
6767
typedef FilenameList::iterator FilenameListIter;
6868
typedef UnsignedByte FileInstance;
6969

@@ -174,7 +174,7 @@ class FileSystem : public SubsystemInterface
174174
typedef std::hash_map<
175175
rts::string_key<AsciiString>, FileExistData,
176176
rts::string_key_hash<AsciiString>,
177-
rts::string_key_equal<AsciiString> > FileExistMap;
177+
rts::string_key_equal<AsciiString>/**/> FileExistMap;
178178

179179
mutable FileExistMap m_fileExist;
180180
mutable FastCriticalSectionClass m_fileExistMutex;

Core/GameEngine/Include/Common/GameAudio.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ struct AudioRequest;
6666
struct AudioSettings;
6767
struct MiscAudio;
6868

69-
typedef std::hash_map<AsciiString, AudioEventInfo*, rts::hash<AsciiString>, rts::equal_to<AsciiString> > AudioEventInfoHash;
69+
typedef std::hash_map<AsciiString, AudioEventInfo*, rts::hash<AsciiString>, rts::equal_to<AsciiString>/**/> AudioEventInfoHash;
7070
typedef AudioEventInfoHash::iterator AudioEventInfoHashIt;
7171
typedef UnsignedInt AudioHandle;
7272

@@ -337,7 +337,7 @@ class AudioManager : public SubsystemInterface
337337

338338
AudioEventInfoHash m_allAudioEventInfo;
339339
AudioHandle theAudioHandlePool;
340-
std::list<std::pair<AsciiString, Real> > m_adjustedVolumes;
340+
std::list<std::pair<AsciiString, Real>/**/> m_adjustedVolumes;
341341

342342
Real m_musicVolume;
343343
Real m_soundVolume;

Core/GameEngine/Include/Common/STLTypedefs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ typedef std::vector<NamedRequest>::iterator VecNamedRequestsIt;
108108
typedef std::vector<Bool> BoolVector;
109109
typedef std::vector<Bool>::iterator BoolVectorIterator;
110110

111-
typedef std::map< NameKeyType, Real, std::less<NameKeyType> > ProductionChangeMap;
112-
typedef std::map< NameKeyType, VeterancyLevel, std::less<NameKeyType> > ProductionVeterancyMap;
111+
typedef std::map< NameKeyType, Real, std::less<NameKeyType>/**/> ProductionChangeMap;
112+
typedef std::map< NameKeyType, VeterancyLevel, std::less<NameKeyType>/**/> ProductionVeterancyMap;
113113

114114
// Some useful, common hash and equal_to functors for use with hash_map
115115
namespace rts

Core/GameEngine/Include/GameClient/FXList.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ class FXListStore : public SubsystemInterface
209209
private:
210210

211211
// use the hashing function for Ints.
212-
typedef std::hash_map< NameKeyType, FXList, rts::hash<NameKeyType>, rts::equal_to<NameKeyType> > FXListMap;
212+
typedef std::hash_map< NameKeyType, FXList, rts::hash<NameKeyType>, rts::equal_to<NameKeyType>/**/> FXListMap;
213213

214214
FXListMap m_fxmap;
215215

Core/GameEngine/Include/GameClient/ParticleSys.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,8 +743,8 @@ class ParticleSystemManager : public SubsystemInterface,
743743

744744
typedef std::list<ParticleSystem*> ParticleSystemList;
745745
typedef ParticleSystemList::iterator ParticleSystemListIt;
746-
typedef std::hash_map<ParticleSystemID, ParticleSystem *, rts::hash<ParticleSystemID>, rts::equal_to<ParticleSystemID> > ParticleSystemIDMap;
747-
typedef std::hash_map<AsciiString, ParticleSystemTemplate *, rts::hash<AsciiString>, rts::equal_to<AsciiString> > TemplateMap;
746+
typedef std::hash_map<ParticleSystemID, ParticleSystem *, rts::hash<ParticleSystemID>, rts::equal_to<ParticleSystemID>/**/> ParticleSystemIDMap;
747+
typedef std::hash_map<AsciiString, ParticleSystemTemplate *, rts::hash<AsciiString>, rts::equal_to<AsciiString>/**/> TemplateMap;
748748

749749
ParticleSystemManager();
750750
virtual ~ParticleSystemManager() override;

Core/GameEngine/Include/GameClient/WindowVideoManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class WindowVideoManager : public SubsystemInterface
153153
}
154154
};
155155

156-
typedef std::hash_map< ConstGameWindowPtr, WindowVideo *, hashConstGameWindowPtr, std::equal_to<ConstGameWindowPtr> > WindowVideoMap;
156+
typedef std::hash_map< ConstGameWindowPtr, WindowVideo *, hashConstGameWindowPtr, std::equal_to<ConstGameWindowPtr>/**/> WindowVideoMap;
157157

158158
WindowVideoMap m_playingVideos; ///< List of currently playin Videos
159159
//WindowVideoMap m_pausedVideos; ///< List of currently paused Videos

Core/GameEngine/Source/Common/Audio/GameAudio.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ AudioHandle AudioManager::addAudioEvent(const AudioEventRTS *eventToAdd)
443443
eventToAdd->setPlayingAudioIndex( audioEvent->getPlayingAudioIndex() );
444444
audioEvent->generatePlayInfo(); // generate pitch shift and volume shift now as well
445445

446-
std::list<std::pair<AsciiString, Real> >::iterator it;
446+
std::list<std::pair<AsciiString, Real>/**/>::iterator it;
447447
for (it = m_adjustedVolumes.begin(); it != m_adjustedVolumes.end(); ++it) {
448448
if (it->first == audioEvent->getEventName()) {
449449
audioEvent->setVolume(it->second);
@@ -601,7 +601,7 @@ void AudioManager::setAudioEventVolumeOverride( AsciiString eventToAffect, Real
601601
adjustVolumeOfPlayingAudio(eventToAffect, newVolume);
602602
}
603603

604-
std::list<std::pair<AsciiString, Real> >::iterator it;
604+
std::list<std::pair<AsciiString, Real>/**/>::iterator it;
605605
for (it = m_adjustedVolumes.begin(); it != m_adjustedVolumes.end(); ++it) {
606606
if (it->first == eventToAffect) {
607607
if (newVolume == -1.0f) {

Core/GameEngine/Source/Common/System/GameMemory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ DECLARE_PERF_TIMER(MemoryPoolInitFilling)
184184
Int used, peak, waste, peakwaste;
185185
UsedNPeak() : used(0), peak(0), waste(0), peakwaste(0) { }
186186
};
187-
typedef std::map< const char*, UsedNPeak, std::less<const char*> > UsedNPeakMap;
187+
typedef std::map< const char*, UsedNPeak, std::less<const char*>/**/> UsedNPeakMap;
188188
static UsedNPeakMap TheUsedNPeakMap;
189189
static Int doingIntenseDMA = 0;
190190
#endif

Core/GameEngine/Source/GameClient/MapUtil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ Bool WouldMapTransfer( const AsciiString& mapName )
722722
}
723723

724724
//-------------------------------------------------------------------------------------------------
725-
typedef std::set<UnicodeString, rts::less_than_nocase<UnicodeString> > MapNameList;
725+
typedef std::set<UnicodeString, rts::less_than_nocase<UnicodeString>/**/> MapNameList;
726726
typedef std::map<UnicodeString, AsciiString> MapDisplayToFileNameList;
727727

728728
static void buildMapListForNumPlayers(MapNameList &outMapNames, MapDisplayToFileNameList &outFileNames, Int numPlayers)

Core/GameEngineDevice/Include/MilesAudioDevice/MilesAudioManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ struct OpenAudioFile
103103
const AudioEventInfo *m_eventInfo; // Not mutable, unlike the one on AudioEventRTS.
104104
};
105105

106-
typedef std::hash_map< AsciiString, OpenAudioFile, rts::hash<AsciiString>, rts::equal_to<AsciiString> > OpenFilesHash;
106+
typedef std::hash_map< AsciiString, OpenAudioFile, rts::hash<AsciiString>, rts::equal_to<AsciiString>/**/> OpenFilesHash;
107107
typedef OpenFilesHash::iterator OpenFilesHashIt;
108108

109109
class AudioFileCache

0 commit comments

Comments
 (0)