Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-01-12 19:32:05 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-01-12 19:32:05 +0400
commit68d83f41400468b4c15b2201e8138b60756d1f30 (patch)
treec44296b85776f0972b7eb418f7cc57941c267d06 /source/gameengine/Expressions
parentc93e127e7a2040f74655937fedb5a9d439c03aa9 (diff)
quiet compiler warning with string formatting in CParser::Term
Diffstat (limited to 'source/gameengine/Expressions')
-rw-r--r--source/gameengine/Expressions/InputParser.cpp10
-rw-r--r--source/gameengine/Expressions/InputParser.h2
2 files changed, 7 insertions, 5 deletions
diff --git a/source/gameengine/Expressions/InputParser.cpp b/source/gameengine/Expressions/InputParser.cpp
index 0a5af4a18ea..5a2075d52df 100644
--- a/source/gameengine/Expressions/InputParser.cpp
+++ b/source/gameengine/Expressions/InputParser.cpp
@@ -354,7 +354,7 @@ int CParser::MakeInt()
}
#endif
-STR_String CParser::Symbol2Str(int s)
+const char *CParser::Symbol2Str(int s)
{
// returns a string representation of of symbol s,
// for use in Term when generating an error
@@ -370,18 +370,20 @@ STR_String CParser::Symbol2Str(int s)
case whocodedsym: return "WHOMADE";
case eolsym: return "end of line";
case idsym: return "identifier";
- default: return "unknown"; // should not happen
}
+ return "unknown"; // should not happen
}
void CParser::Term(int s)
{
// generates an error if the next symbol isn't the specified symbol s
// otherwise, skip the symbol
- if (s == sym) NextSym();
+ if (s == sym) {
+ NextSym();
+ }
else {
STR_String msg;
- msg.Format("Warning: " + Symbol2Str(s) + " expected\ncontinuing without it");
+ msg.Format("Warning: %s expected\ncontinuing without it", Symbol2Str(s));
// AfxMessageBox(msg,MB_ICONERROR);
diff --git a/source/gameengine/Expressions/InputParser.h b/source/gameengine/Expressions/InputParser.h
index 6dfeff55105..50bb1ae2f6e 100644
--- a/source/gameengine/Expressions/InputParser.h
+++ b/source/gameengine/Expressions/InputParser.h
@@ -102,7 +102,7 @@ private:
#if 0 /* not used yet */
int MakeInt();
#endif
- STR_String Symbol2Str(int s);
+ const char *Symbol2Str(int s);
void Term(int s);
int Priority(int optor);
CExpression *Ex(int i);