Build issues in demangle.cc

git-svn-id: https://google-glog.googlecode.com/svn/trunk@141 eb4d4688-79bd-11dd-afb4-1d65580434c0
This commit is contained in:
2014-03-02 01:37:08 +00:00
parent 8367470aa5
commit a5ffa88413

View File

@ -167,7 +167,7 @@ static size_t StrLen(const char *str) {
// Returns true if "str" has at least "n" characters remaining. // Returns true if "str" has at least "n" characters remaining.
static bool AtLeastNumCharsRemaining(const char *str, int n) { static bool AtLeastNumCharsRemaining(const char *str, int n) {
for (int i = 0; i < n; ++i) { for (int i = 0; i < n; ++i) {
if (str == '\0') { if (str[i] == '\0') {
return false; return false;
} }
} }
@ -223,9 +223,6 @@ static bool ParseTwoCharToken(State *state, const char *two_char_token) {
// Returns true and advances "mangled_cur" if we find any character in // Returns true and advances "mangled_cur" if we find any character in
// "char_class" at "mangled_cur" position. // "char_class" at "mangled_cur" position.
static bool ParseCharClass(State *state, const char *char_class) { static bool ParseCharClass(State *state, const char *char_class) {
if (state->mangled_cur == '\0') {
return false;
}
const char *p = char_class; const char *p = char_class;
for (; *p != '\0'; ++p) { for (; *p != '\0'; ++p) {
if (state->mangled_cur[0] == *p) { if (state->mangled_cur[0] == *p) {