diff --git a/tools/xml2cpp-codegen/xml2cpp.cpp b/tools/xml2cpp-codegen/xml2cpp.cpp index 5b6c7fe..6bb8796 100644 --- a/tools/xml2cpp-codegen/xml2cpp.cpp +++ b/tools/xml2cpp-codegen/xml2cpp.cpp @@ -149,7 +149,7 @@ int main(int argc, char **argv) std::ifstream input(xmlFile); - if (input.bad()) + if (input.fail()) { std::cerr << "Unable to open file " << xmlFile << endl; return 1;