X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?a=blobdiff_plain;f=src%2Fconfig%2Freader.cpp;h=0335faf3fcf5d5f988831b1fe2c0730e7393a607;hb=6234dc8ac6f39176121740b756828f0cba565149;hp=d29f8b0daa09de7513ff23760c53178b8423fc4f;hpb=a3e0400dfe6b7bc43e43db787ff701da8be9c5cc;p=physics.git diff --git a/src/config/reader.cpp b/src/config/reader.cpp index d29f8b0..0335faf 100644 --- a/src/config/reader.cpp +++ b/src/config/reader.cpp @@ -19,6 +19,10 @@ #include "../debug.h" #include +using std::cerr; +using std::cout; +using std::endl; + #include #include @@ -93,9 +97,6 @@ void processLine(const string& str) { *(key::sdlMap[name]) = key; } - cout << name << endl; - cout << value << endl; - cout << key << endl; } } @@ -117,11 +118,11 @@ bool extractLine(const string& str, string* name, string* value) int char_pos = 0; - int name_start; - int name_end; + int name_start = 0; + int name_end = 0; - int value_start; - int value_end; + int value_start = 0; + int value_end = 0; const char* c_str = str.c_str(); @@ -207,7 +208,7 @@ void createKeyMap() for (int i = 'A'; i <= 'Z'; i++) // uppercase { buf[0] = (char)i; - keyMap[buf] = (SDLKey)i; + keyMap[buf] = (SDLKey)(i + 'a' - 'A'); } for (int i = 'a'; i <= 'z'; i++) // lowercase {