Skip to content

Commit f3ba422

Browse files
authored
refactor(format): Remove trailing whitespace from game code files (#1425)
1 parent a410605 commit f3ba422

File tree

3,815 files changed

+78735
-78686
lines changed

Some content is hidden

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

3,815 files changed

+78735
-78686
lines changed

Core/GameEngine/Include/Common/ArchiveFile.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class File;
4040
/**
4141
* An archive file is itself a collection of sub files. Each file inside the archive file
4242
* has a unique name by which it can be accessed. The ArchiveFile object class is the
43-
* runtime interface to the mix file and the sub files. Each file inside the mix
43+
* runtime interface to the mix file and the sub files. Each file inside the mix
4444
* file can be accessed by the openFile().
4545
*
4646
* ArchiveFile interfaces can be created by the TheArchiveFileSystem object.
@@ -74,4 +74,4 @@ class ArchiveFile
7474
DetailedArchivedDirectoryInfo m_rootDirectory;
7575
};
7676

77-
#endif // __ARCHIVEFILE_H
77+
#endif // __ARCHIVEFILE_H

Core/GameEngine/Include/Common/ArchiveFileSystem.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
////////////////////////////////////////////////////////////////////////////////
2424

2525
//----------------------------------------------------------------------------
26-
//
27-
// Westwood Studios Pacific.
28-
//
29-
// Confidential Information
30-
// Copyright (C) 2001 - All Rights Reserved
31-
//
26+
//
27+
// Westwood Studios Pacific.
28+
//
29+
// Confidential Information
30+
// Copyright (C) 2001 - All Rights Reserved
31+
//
3232
//----------------------------------------------------------------------------
3333
//
3434
// Project: Generals
@@ -49,7 +49,7 @@
4949
#define MUSIC_BIG "Music.big"
5050

5151
//----------------------------------------------------------------------------
52-
// Includes
52+
// Includes
5353
//----------------------------------------------------------------------------
5454

5555
#include "Common/SubsystemInterface.h"
@@ -90,7 +90,7 @@ typedef std::map<AsciiString, ArchivedFileInfo> ArchivedFileInfoMap;
9090
typedef std::map<AsciiString, ArchiveFile *> ArchiveFileMap;
9191
typedef std::map<AsciiString, AsciiString> ArchivedFileLocationMap; // first string is the file name, second one is the archive filename.
9292

93-
class ArchivedDirectoryInfo
93+
class ArchivedDirectoryInfo
9494
{
9595
public:
9696
AsciiString m_directoryName;
@@ -106,7 +106,7 @@ class ArchivedDirectoryInfo
106106

107107
};
108108

109-
class DetailedArchivedDirectoryInfo
109+
class DetailedArchivedDirectoryInfo
110110
{
111111
public:
112112
AsciiString m_directoryName;
@@ -121,7 +121,7 @@ class DetailedArchivedDirectoryInfo
121121
}
122122
};
123123

124-
class ArchivedFileInfo
124+
class ArchivedFileInfo
125125
{
126126
public:
127127
AsciiString m_filename;
@@ -167,7 +167,7 @@ class ArchiveFileSystem : public SubsystemInterface
167167

168168
void getFileListInDirectory(const AsciiString& currentDirectory, const AsciiString& originalDirectory, const AsciiString& searchName, FilenameList &filenameList, Bool searchSubdirectories) const; ///< search the given directory for files matching the searchName (egs. *.ini, *.rep). Possibly search subdirectories. Scans each Archive file.
169169
Bool getFileInfo(const AsciiString& filename, FileInfo *fileInfo) const; ///< see FileSystem.h
170-
170+
171171
virtual Bool loadBigFilesFromDirectory(AsciiString dir, AsciiString fileMask, Bool overwrite = FALSE) = 0;
172172

173173
// Unprotected this for copy-protection routines
@@ -185,7 +185,7 @@ class ArchiveFileSystem : public SubsystemInterface
185185
extern ArchiveFileSystem *TheArchiveFileSystem;
186186

187187
//----------------------------------------------------------------------------
188-
// Inlining
188+
// Inlining
189189
//----------------------------------------------------------------------------
190190

191191
#endif // __ARCHIVEFILESYSTEM_H_

Core/GameEngine/Include/Common/AsciiString.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
// //
2323
////////////////////////////////////////////////////////////////////////////////
2424

25-
// FILE: AsciiString.h
25+
// FILE: AsciiString.h
2626
//-----------------------------------------------------------------------------
27-
//
28-
// Westwood Studios Pacific.
29-
//
30-
// Confidential Information
31-
// Copyright (C) 2001 - All Rights Reserved
32-
//
27+
//
28+
// Westwood Studios Pacific.
29+
//
30+
// Confidential Information
31+
// Copyright (C) 2001 - All Rights Reserved
32+
//
3333
//-----------------------------------------------------------------------------
3434
//
3535
// Project: RTS3
@@ -72,7 +72,7 @@ class UnicodeString;
7272
type, rather analogous to 'int' -- when passed by value, a new string
7373
is created, and modifying the new string doesn't modify the original.
7474
This is done fairly efficiently, so that no new memory allocation is done
75-
unless the string is actually modified.
75+
unless the string is actually modified.
7676
7777
Naturally, AsciiString handles all memory issues, so there's no need
7878
to do anything to free memory... just allow the AsciiString's
@@ -84,7 +84,7 @@ class UnicodeString;
8484
class AsciiString
8585
{
8686
private:
87-
87+
8888
// Note, this is a Plain Old Data Structure... don't
8989
// add a ctor/dtor, 'cuz they won't ever be called.
9090
struct AsciiStringData
@@ -114,8 +114,8 @@ class AsciiString
114114

115115
public:
116116

117-
enum
118-
{
117+
enum
118+
{
119119
MAX_FORMAT_BUF_LEN = 2048, ///< max total len of string created by format/format_va
120120
MAX_LEN = 32767 ///< max total len of any AsciiString, in chars
121121
};
@@ -142,7 +142,7 @@ class AsciiString
142142
/**
143143
Constructor -- from a literal string. Constructs an AsciiString
144144
with the given string. Note that a copy of the string is made;
145-
the input ptr is not saved.
145+
the input ptr is not saved.
146146
Note that this is no longer explicit, as the conversion is almost
147147
always wanted, anyhow.
148148
*/
@@ -178,8 +178,8 @@ class AsciiString
178178
*/
179179
char getCharAt(int index) const;
180180
/**
181-
Return a pointer to the (null-terminated) string. Note that this is
182-
a const pointer: do NOT change this! It is imperative that it be
181+
Return a pointer to the (null-terminated) string. Note that this is
182+
a const pointer: do NOT change this! It is imperative that it be
183183
impossible (or at least, really difficuly) for someone to change our
184184
private data, since it might be shared amongst other AsciiStrings.
185185
*/
@@ -188,7 +188,7 @@ class AsciiString
188188
/**
189189
Makes sure there is room for a string of len+1 characters, and
190190
returns a pointer to the string buffer. This ensures that the
191-
string buffer is NOT shared. This is intended for the file reader,
191+
string buffer is NOT shared. This is intended for the file reader,
192192
that is reading new strings in from a file. jba.
193193
*/
194194
char* getBufferForRead(Int len);
@@ -250,7 +250,7 @@ class AsciiString
250250

251251
/**
252252
Remove the final character in the string. If the string is empty,
253-
do nothing. (This is a rather dorky method, but used a lot in
253+
do nothing. (This is a rather dorky method, but used a lot in
254254
text editing, thus its presence here.)
255255
*/
256256
void removeLastChar();

Core/GameEngine/Include/Common/AudioAffect.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
#include <Lib/BaseType.h>
3434

35-
// if it is set by the options panel, use the system setting parameter. Otherwise, this will be
35+
// if it is set by the options panel, use the system setting parameter. Otherwise, this will be
3636
// appended to whatever the current system volume is.
3737
enum AudioAffect CPP_11(: Int)
3838
{

Core/GameEngine/Include/Common/AudioEventInfo.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ enum SoundType CPP_11(: Int)
6969
ST_PLAYER = 0x0020,
7070
ST_ALLIES = 0x0040,
7171
ST_ENEMIES = 0x0080,
72-
ST_EVERYONE = 0x0100,
72+
ST_EVERYONE = 0x0100,
7373
};
7474

7575
extern const char *theAudioControlNames[];
@@ -97,11 +97,11 @@ struct AudioEventInfo : public MemoryPoolObject
9797
Real m_minVolume; // Clamped minimum value, useful when muting sound effects
9898
Real m_pitchShiftMin; // minimum pitch shift value
9999
Real m_pitchShiftMax; // maximum pitch shift value
100-
Int m_delayMin; // minimum delay before we'll fire up another one of these
101-
Int m_delayMax; // maximum delay before we'll fire up another one of these
100+
Int m_delayMin; // minimum delay before we'll fire up another one of these
101+
Int m_delayMax; // maximum delay before we'll fire up another one of these
102102
Int m_limit; // Limit to the number of these sounds that can be fired up simultaneously
103103
Int m_loopCount; // number of times to loop this sound
104-
104+
105105
AudioPriority m_priority; // Priority of this sound
106106
UnsignedInt m_type; // Type of sound
107107
UnsignedInt m_control; // control of sound
@@ -119,8 +119,8 @@ struct AudioEventInfo : public MemoryPoolObject
119119
Real m_maxDistance; // greater than this distance and the sound behaves as though it is muted
120120

121121
AudioType m_soundType; // This should be either Music, Streaming or SoundEffect
122-
123-
122+
123+
124124
// DynamicAudioEventInfo interfacing functions
125125
virtual Bool isLevelSpecific() const { return false; } ///< If true, this sound is only defined on the current level and can be deleted when that level ends
126126
virtual DynamicAudioEventInfo * getDynamicAudioEventInfo() { return NULL; } ///< If this object is REALLY a DynamicAudioEventInfo, return a pointer to the derived class
@@ -129,7 +129,7 @@ struct AudioEventInfo : public MemoryPoolObject
129129
/// Is this a permenant sound? That is, if I start this sound up, will it ever end
130130
/// "on its own" or only if I explicitly kill it?
131131
Bool isPermanentSound() const { return BitIsSet( m_control, AC_LOOP ) && (m_loopCount == 0 ); }
132-
132+
133133
static const FieldParse m_audioEventInfo[]; ///< the parse table for INI definition
134134
const FieldParse *getFieldParse( void ) const { return m_audioEventInfo; }
135135
};

Core/GameEngine/Include/Common/AudioEventRTS.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ enum AudioPriority CPP_11(: Int);
6161
// You might want this to be memory pooled (I personally do), but it can't
6262
// because we allocate them on the stack frequently.
6363
class AudioEventRTS
64-
{
64+
{
6565
public:
6666
AudioEventRTS( );
6767
AudioEventRTS( const AsciiString& eventName );
@@ -78,7 +78,7 @@ class AudioEventRTS
7878
const AsciiString& getEventName( void ) const { return m_eventName; }
7979

8080
// generateFilename is separate from generatePlayInfo because generatePlayInfo should only be called once
81-
// per triggered event. generateFilename will be called once per loop, or once to get each filename if 'all' is
81+
// per triggered event. generateFilename will be called once per loop, or once to get each filename if 'all' is
8282
// specified.
8383
void generateFilename( void );
8484
AsciiString getFilename( void );
@@ -97,13 +97,13 @@ class AudioEventRTS
9797
PortionToPlay getNextPlayPortion( void ) const;
9898
void advanceNextPlayPortion( void );
9999
void setNextPlayPortion( PortionToPlay ptp );
100-
100+
101101
void decreaseLoopCount( void );
102102
Bool hasMoreLoops( void ) const;
103-
103+
104104
void setAudioEventInfo( const AudioEventInfo *eventInfo ) const;
105105
const AudioEventInfo *getAudioEventInfo( void ) const;
106-
106+
107107
void setPlayingHandle( AudioHandle handle ); // for ID of this audio piece.
108108
AudioHandle getPlayingHandle( void ); // for ID of this audio piece
109109

@@ -115,7 +115,7 @@ class AudioEventRTS
115115

116116
Bool isDead() const { return m_ownerType == OT_Dead; }
117117
OwnerType getOwnerType() const { return m_ownerType; }
118-
118+
119119
void setDrawableID( DrawableID drawID );
120120
DrawableID getDrawableID( void );
121121

@@ -147,11 +147,11 @@ class AudioEventRTS
147147
void setPlayingAudioIndex( Int pai ) { m_playingAudioIndex = pai; };
148148

149149
Bool getUninterruptable( ) const { return m_uninterruptable; }
150-
void setUninterruptable( Bool uninterruptable ) { m_uninterruptable = uninterruptable; }
150+
void setUninterruptable( Bool uninterruptable ) { m_uninterruptable = uninterruptable; }
151151

152152

153-
// This will retrieve the appropriate position based on type.
154-
const Coord3D *getCurrentPosition( void );
153+
// This will retrieve the appropriate position based on type.
154+
const Coord3D *getCurrentPosition( void );
155155

156156
// This will return the directory leading up to the appropriate type, including the trailing '\\'
157157
// If localized is true, we'll append a language specifc directory to the end of the path.
@@ -164,7 +164,7 @@ class AudioEventRTS
164164
AsciiString m_filenameToLoad;
165165
mutable const AudioEventInfo *m_eventInfo; // Mutable so that it can be modified even on const objects
166166
AudioHandle m_playingHandle;
167-
167+
168168
AudioHandle m_killThisHandle; ///< Sometimes sounds will canabilize other sounds in order to take their handle away.
169169
///< This is one of those instances.
170170

@@ -173,7 +173,7 @@ class AudioEventRTS
173173
AsciiString m_decayName; ///< This is the filename that should be used during the decay.
174174

175175
AudioPriority m_priority; ///< This should be the priority as given by the event info, or the overrided priority.
176-
Real m_volume; ///< This is the override for the volume. It will either be the normal
176+
Real m_volume; ///< This is the override for the volume. It will either be the normal
177177
TimeOfDay m_timeOfDay; ///< This should be the current Time Of Day.
178178

179179
Coord3D m_positionOfAudio; ///< Position of the sound if no further positional updates are necessary
@@ -195,15 +195,15 @@ class AudioEventRTS
195195
Int m_loopCount; ///< The current loop count value. Only valid if this is a looping type event or the override has been set.
196196
Int m_playingAudioIndex; ///< The sound index we are currently playing. In the case of non-random, we increment this to move to the next sound
197197
Int m_allCount; ///< If this sound is an ALL type, then this is how many sounds we have played so far.
198-
198+
199199
Int m_playerIndex; ///< The index of the player who owns this sound. Used for sounds that should have an owner, but don't have an object, etc.
200200

201201
PortionToPlay m_portionToPlayNext; ///< Which portion (attack, sound, decay) should be played next?
202202
};
203203

204204
class DynamicAudioEventRTS : public MemoryPoolObject
205-
{
206-
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(DynamicAudioEventRTS, "DynamicAudioEventRTS" )
205+
{
206+
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(DynamicAudioEventRTS, "DynamicAudioEventRTS" )
207207
public:
208208

209209
DynamicAudioEventRTS() { }

Core/GameEngine/Include/Common/AudioRequest.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ struct AudioRequest : public MemoryPoolObject
4949

5050
public:
5151
RequestType m_request;
52-
union
52+
union
5353
{
5454
AudioEventRTS *m_pendingEvent;
5555
AudioHandle m_handleToInteractOn;

Core/GameEngine/Include/Common/AudioSettings.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ struct AudioSettings
6868
UnsignedInt m_maxCacheSize;
6969

7070
Real m_minVolume; // At volumes less than this, the sample will be culled.
71-
71+
7272
AsciiString m_preferred3DProvider[MAX_HW_PROVIDERS + 1];
7373

7474
//Defaults actually don't ever get changed!
@@ -98,7 +98,7 @@ struct AudioSettings
9898
//Handles changing sound volume whenever the camera is close to the microphone.
9999
Real m_zoomMinDistance; //If we're closer than the minimum distance, then apply the full bonus no matter how close.
100100
Real m_zoomMaxDistance; //The maximum distance from microphone we need to be before benefiting from any bonus.
101-
101+
102102
//NOTE: The higher this value is, the lower normal sounds will be! If you specify a sound volume value of 25%, then sounds will play
103103
//between 75% and 100%, not 100% to 125%!
104104
Real m_zoomSoundVolumePercentageAmount; //The amount of sound volume dedicated to zooming.

Core/GameEngine/Include/Common/CRCDebug.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191

9292
extern Int lastCRCDebugFrame;
9393
extern Int lastCRCDebugIndex;
94-
94+
9595
extern Bool g_verifyClientCRC;
9696
extern Bool g_clientDeepCRC;
9797

@@ -130,4 +130,4 @@ extern Int NET_CRC_INTERVAL;
130130
extern Int REPLAY_CRC_INTERVAL;
131131
extern Bool TheDebugIgnoreSyncErrors;
132132

133-
#endif // __CRCDEBUG_H__
133+
#endif // __CRCDEBUG_H__

0 commit comments

Comments
 (0)