projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aee6c4d
)
Rewrite spacing logic to properly handle comments
author
Mathnerd314
<man.is.allan@gmail.com>
Wed, 21 Jan 2009 01:20:54 +0000
(
01:20
+0000)
committer
Mathnerd314
<man.is.allan@gmail.com>
Wed, 21 Jan 2009 01:20:54 +0000
(
01:20
+0000)
SVN-Revision: 5830
src/tinygettext/tinygettext.cpp
patch
|
blob
|
history
diff --git
a/src/tinygettext/tinygettext.cpp
b/src/tinygettext/tinygettext.cpp
index
21fea97
..
7ba2c60
100644
(file)
--- a/
src/tinygettext/tinygettext.cpp
+++ b/
src/tinygettext/tinygettext.cpp
@@
-619,15
+619,12
@@
public:
if(c == EOF)
return;
- while(isspace(static_cast<unsigned char>(c))) nextChar();
-
- // Comments are whitespace too (remove if we ever parse comments)
- if (c == '#')
- {
- do {
- nextChar();
- } while(c != '\n' && c != EOF);
+ while(c == '#' || isspace(static_cast<unsigned char>(c))) {
+ if(c == '#') {
+ while(c != '\n' && c != EOF) nextChar();
}
+ nextChar();
+ }
}
inline bool expectToken(std::string type, Token wanted) {