Skip to content

Commit 62fbac2

Browse files
Corrected ortograph of some core classes.
1 parent 9a1c29f commit 62fbac2

Some content is hidden

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

91 files changed

+1966
-1966
lines changed

libgag/include/FormatableString.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ namespace GAGCore {
2727
/*!
2828
* string that can be used for argument substitution.
2929
* Example :
30-
* FormatableString fs("Hello %0");
30+
* FormattableString fs("Hello %0");
3131
* cout << fs.arg("World");
3232
*/
33-
class FormatableString : public std::string
33+
class FormattableString : public std::string
3434
{
3535
private:
3636
/*!
@@ -45,14 +45,14 @@ namespace GAGCore {
4545

4646
public:
4747

48-
FormatableString() : std::string(), argLevel(0) { }
48+
FormattableString() : std::string(), argLevel(0) { }
4949
/*!
50-
* Creates a new FormatableString with format string set to s.
50+
* Creates a new FormattableString with format string set to s.
5151
* \param s A string with indicators for argument substitution.
5252
* Each indicator is the % symbol followed by a number. The number
5353
* is the index of the corresponding argument (starting at %0).
5454
*/
55-
FormatableString(const std::string &s)
55+
FormattableString(const std::string &s)
5656
: std::string(s), argLevel(0) { }
5757

5858
/*!
@@ -63,7 +63,7 @@ namespace GAGCore {
6363
* \param fillChar Character used to pad the number to reach fieldWidth
6464
* \see arg(const T& value)
6565
*/
66-
FormatableString &arg(int value, int fieldWidth = 0, int base = 10, char fillChar = ' ');
66+
FormattableString &arg(int value, int fieldWidth = 0, int base = 10, char fillChar = ' ');
6767

6868
/*!
6969
* Replace the next arg by an int value.
@@ -73,7 +73,7 @@ namespace GAGCore {
7373
* \param fillChar Character used to pad the number to reach fieldWidth
7474
* \see arg(const T& value)
7575
*/
76-
FormatableString &arg(unsigned value, int fieldWidth = 0, int base = 10, char fillChar = ' ');
76+
FormattableString &arg(unsigned value, int fieldWidth = 0, int base = 10, char fillChar = ' ');
7777

7878
/*!
7979
* Replace the next arg by a float value.
@@ -83,14 +83,14 @@ namespace GAGCore {
8383
* \param fillChar Character used to pad the number to reach fieldWidth.
8484
* \see arg(const T& value)
8585
*/
86-
FormatableString &arg(float value, int fieldWidth = 0, int precision = 6, char fillChar = ' ');
86+
FormattableString &arg(float value, int fieldWidth = 0, int precision = 6, char fillChar = ' ');
8787

8888
/*!
8989
* Replace the next arg by a value that can be passed to an ostringstream.
9090
* The first call to arg replace %0, the second %1, and so on.
9191
* \param value Value used to replace the current argument.
9292
*/
93-
template <typename T> FormatableString &arg(const T& value)
93+
template <typename T> FormattableString &arg(const T& value)
9494
{
9595
// transform value into std::string
9696
std::ostringstream oss;
@@ -107,7 +107,7 @@ namespace GAGCore {
107107
* counter.
108108
* \param str New format string.
109109
*/
110-
FormatableString& operator=(const std::string& str) ;
110+
FormattableString& operator=(const std::string& str) ;
111111

112112
/*!
113113
* Casts this string to a const char*

libgag/include/Toolkit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace GAGCore
3131
class StringTable;
3232
class GraphicContext;
3333

34-
//! Toolkit is a ressource server
34+
//! Toolkit is a resource server
3535
class Toolkit
3636
{
3737
private:

libgag/src/FormatableString.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <FormatableString.h>
2828

2929
namespace GAGCore {
30-
void FormatableString::proceedReplace(const std::string &replacement)
30+
void FormattableString::proceedReplace(const std::string &replacement)
3131
{
3232
std::ostringstream search;
3333
search << "%" << this->argLevel;
@@ -43,7 +43,7 @@ namespace GAGCore {
4343
++argLevel;
4444
}
4545

46-
FormatableString &FormatableString::arg(int value, int fieldWidth, int base, char fillChar)
46+
FormattableString &FormattableString::arg(int value, int fieldWidth, int base, char fillChar)
4747
{
4848
std::ostringstream oss;
4949
oss << std::setbase(base);
@@ -59,7 +59,7 @@ namespace GAGCore {
5959
return *this;
6060
}
6161

62-
FormatableString &FormatableString::arg(unsigned value, int fieldWidth, int base, char fillChar)
62+
FormattableString &FormattableString::arg(unsigned value, int fieldWidth, int base, char fillChar)
6363
{
6464
std::ostringstream oss;
6565
oss << std::setbase(base);
@@ -75,7 +75,7 @@ namespace GAGCore {
7575
return *this;
7676
}
7777

78-
FormatableString &FormatableString::arg(float value, int fieldWidth, int precision, char fillChar)
78+
FormattableString &FormattableString::arg(float value, int fieldWidth, int precision, char fillChar)
7979
{
8080
std::ostringstream oss;
8181
oss.precision(precision);
@@ -92,7 +92,7 @@ namespace GAGCore {
9292
return *this;
9393
}
9494

95-
FormatableString &FormatableString::operator=(const std::string& str)
95+
FormattableString &FormattableString::operator=(const std::string& str)
9696
{
9797
this->assign(str);
9898
this->argLevel = 0;

libgag/src/GUIProgressBar.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ namespace GAGGUI
7575
Style::style->drawProgressBar(parent->getSurface(), x, y+hDec, w, value, range);
7676
if (fontPtr)
7777
{
78-
FormatableString text = FormatableString(format).arg((value*100)/range);
78+
FormattableString text = FormattableString(format).arg((value*100)/range);
7979
int textW = fontPtr->getStringWidth(text.c_str());
8080
int textH = fontPtr->getStringHeight(text.c_str());
8181
parent->getSurface()->drawString(x + ((w-textW) >> 1), y + ((h-textH) >> 1), fontPtr, text);

libgag/src/KeyPress.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ std::string KeyPress::format() const
162162
s+="<meta>";
163163
if(shift)
164164
s+="<shift>";
165-
s+=FormatableString("<%0>").arg(key);
165+
s+=FormattableString("<%0>").arg(key);
166166
return s;
167167
}
168168

@@ -248,13 +248,13 @@ std::string KeyPress::getTranslated() const
248248
}
249249
//Visual order, control always first. Rather than alt-control-a for example, its control-alt-a
250250
if(alt)
251-
str=FormatableString(table->getString("[alt %0]")).arg(str);
251+
str=FormattableString(table->getString("[alt %0]")).arg(str);
252252
if(meta)
253-
str=FormatableString(table->getString("[meta %0]")).arg(str);
253+
str=FormattableString(table->getString("[meta %0]")).arg(str);
254254
if(shift)
255-
str=FormatableString(table->getString("[shift %0]")).arg(str);
255+
str=FormattableString(table->getString("[shift %0]")).arg(str);
256256
if(control)
257-
str=FormatableString(table->getString("[control %0]")).arg(str);
257+
str=FormattableString(table->getString("[control %0]")).arg(str);
258258
return str;
259259
}
260260

libgag/src/StringTable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ namespace GAGCore
182182
bool lcwp=false;
183183
int baseCount=0;
184184
const std::string &s = it->first;
185-
// we check that we only have valid format (from a FormatableString point of view)...
185+
// we check that we only have valid format (from a FormattableString point of view)...
186186
for (size_t j=0; j<s.length(); j++)
187187
{
188188
char c = s[j];

src/AI.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ using boost::shared_ptr;
4040
/*AI::AI(Player *player)
4141
{
4242
aiImplementation=new AICastor(player);
43-
this->implementitionID=NUMBI;
43+
this->implementationID=NUMBI;
4444
this->player=player;
4545
}*/
4646

47-
AI::AI(ImplementitionID implementitionID, Player *player)
47+
AI::AI(ImplementationID implementationID, Player *player)
4848
{
4949
aiImplementation=NULL;
5050

51-
switch (implementitionID)
51+
switch (implementationID)
5252
{
5353
case NONE:
5454
aiImplementation=new AINull();
@@ -65,7 +65,7 @@ AI::AI(ImplementitionID implementitionID, Player *player)
6565
case WARRUSH:
6666
aiImplementation=new AIWarrush(player);
6767
break;
68-
case REACHTOINFINITY:
68+
case REACH_TO_INFINITY:
6969
aiImplementation=new AIEcho::Echo(new AIEcho::ReachToInfinity, player);
7070
break;
7171
case TOUBIB:
@@ -76,14 +76,14 @@ AI::AI(ImplementitionID implementitionID, Player *player)
7676
break;
7777
}
7878

79-
this->implementitionID=implementitionID;
79+
this->implementationID=implementationID;
8080
this->player=player;
8181
}
8282

8383
AI::AI(GAGCore::InputStream *stream, Player *player, Sint32 versionMinor)
8484
{
8585
aiImplementation=NULL;
86-
implementitionID=NONE;
86+
implementationID=NONE;
8787
this->player=player;
8888
bool goodLoad=load(stream, versionMinor);
8989
assert(goodLoad);
@@ -119,14 +119,14 @@ bool AI::load(GAGCore::InputStream *stream, Sint32 versionMinor)
119119
stream->read(signature, 4, "signatureStart");
120120
if (memcmp(signature,"AI b", 4)!=0)
121121
{
122-
fprintf(stderr, "AI::bad begining signature\n");
122+
fprintf(stderr, "AI::bad beginning signature\n");
123123
stream->readLeaveSection();
124124
return false;
125125
}
126126

127-
implementitionID=(ImplementitionID)stream->readUint32("implementitionID");
127+
implementationID=(ImplementationID)stream->readUint32("implementitionID");
128128

129-
switch (implementitionID)
129+
switch (implementationID)
130130
{
131131
case NONE:
132132
aiImplementation=new AINull();
@@ -141,7 +141,7 @@ bool AI::load(GAGCore::InputStream *stream, Sint32 versionMinor)
141141
aiImplementation=new AIEcho::Echo(new NewNicowar, player);
142142
aiImplementation->load(stream, player, versionMinor);
143143
break;
144-
case REACHTOINFINITY:
144+
case REACH_TO_INFINITY:
145145
aiImplementation=new AIEcho::Echo(new AIEcho::ReachToInfinity, player);
146146
aiImplementation->load(stream, player, versionMinor);
147147
break;
@@ -152,7 +152,7 @@ bool AI::load(GAGCore::InputStream *stream, Sint32 versionMinor)
152152
aiImplementation=new AIWarrush(stream, player, versionMinor);
153153
break;
154154
default:
155-
fprintf(stderr, "AI id %d does not exist, you probably try to load a map from a more recent version of glob2.\n", implementitionID);
155+
fprintf(stderr, "AI id %d does not exist, you probably try to load a map from a more recent version of glob2.\n", implementationID);
156156
assert(false);
157157
break;
158158
}
@@ -173,7 +173,7 @@ void AI::save(GAGCore::OutputStream *stream)
173173
stream->writeEnterSection("AI");
174174
stream->write("AI b", 4, "signatureStart");
175175

176-
stream->writeUint32(static_cast<Uint32>(implementitionID), "implementitionID");
176+
stream->writeUint32(static_cast<Uint32>(implementationID), "implementitionID");
177177

178178
assert(aiImplementation);
179179
aiImplementation->save(stream);

src/AI.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class AI
3838
{
3939
public:
4040
///TODO: Explain
41-
enum ImplementitionID
41+
enum ImplementationID
4242
{
4343
///Reference to AINull
4444
NONE=0,
@@ -49,7 +49,7 @@ class AI
4949
///Reference to AIWarrush
5050
WARRUSH=3,
5151
///Reference to the AIEcho based AIReachToInfinity
52-
REACHTOINFINITY=4,
52+
REACH_TO_INFINITY=4,
5353
///Reference to the AIEcho based AINicowar
5454
NICOWAR=5,
5555

@@ -58,17 +58,17 @@ class AI
5858

5959
EXPERIMENTAL_SIZE
6060
};
61-
static const ImplementitionID toggleAI=CASTOR;
61+
static const ImplementationID toggleAI=CASTOR;
6262

6363
public:
6464
//AI(Player *player); //TODO: remove this constructor, and choose the AI the user wants.
65-
AI(ImplementitionID implementitionID, Player *player);
65+
AI(ImplementationID implementationID, Player *player);
6666
AI(GAGCore::InputStream *stream, Player *player, Sint32 versionMinor);
6767
~AI();
68-
//void init(ImplementitionID ImplementitionID, Player *player);
68+
//void init(ImplementationID ImplementationID, Player *player);
6969

7070
AIImplementation *aiImplementation;
71-
ImplementitionID implementitionID;
71+
ImplementationID implementationID;
7272

7373
Player *player;
7474

0 commit comments

Comments
 (0)