diff --git a/src/oastat.cpp b/src/oastat.cpp index 59c2f07..7793418 100644 --- a/src/oastat.cpp +++ b/src/oastat.cpp @@ -94,7 +94,7 @@ static void addCommands(std::shared_ptr &db,std::vector(new Accuracy2Db()) ); //Add more commands just above here - for (unsigned int i=0; isetDb(db); } } @@ -127,7 +127,7 @@ static int processStdIn(std::istream &in_p, std::vectorcanProcess(oss)) { commands.at(i)->process(oss); } @@ -177,6 +177,7 @@ std::string getHashedId(const std::string& unhashedID) int main (int argc, const char* argv[]) { try { + std::ios_base::sync_with_stdio(false); std::string dbargs = ""; std::string backend = "Xml"; bool doIntegrationTest = false; diff --git a/src/oastatstruct.cpp b/src/oastatstruct.cpp index 895b8a4..7bfc61b 100644 --- a/src/oastatstruct.cpp +++ b/src/oastatstruct.cpp @@ -29,7 +29,7 @@ https://github.com/sago007/oastat/ static void makeLower(std::string &x) { - for (unsigned int i=0; i= 'A' && x[i] <= 'X') { x[i] = x[i]-'A'+'a'; } @@ -93,7 +93,7 @@ void OaStatStruct::parseLine(const std::string& orgLine) std::map OaStatStruct::GetInfostring(const std::string& restOfLine) const { std::map list; - unsigned int lastPos = 0; + size_t lastPos = 0; bool iskey = true; std::string key; if (restOfLine[0] == '\\') {