Apply changes applied from clang-modernize
Needed 1-2 cleanups by hand. 99% was automatic. * The version that ships with ubuntu 14.04 seems to not work. I had to build from scratch * Use cmake to generate the build commands that clang-modernize wants ```sh cmake -DCMAKE_EXPORT_COMPILE_COMMANDS:bool=true ../ChaiScript/ ``` * Use the clang-modernize tool. Note that you have to be pretty explicit about the include paths if you want it to also update your include files ```sh ../llvm-build/bin/clang-modernize ../ChaiScript/src/*.cpp -for-compilers=gcc-4.8 -include /home/jason/ChaiScript/include,/hjason/ChaiScript/include/chaiscript,/home/jason/ChaiScript/include/chaiscript/dispatchkit,/home/jason/ChaiScript/include/chaiscript/language -p compile_commands.json ``` * In my case, it left some unused `typedef`s behind, which I cleaned up.
This commit is contained in:
@@ -33,7 +33,7 @@ char* readline(const char* p)
|
||||
std::string retval;
|
||||
std::cout << p ;
|
||||
std::getline(std::cin, retval);
|
||||
return std::cin.eof() ? NULL : mystrdup(retval.c_str());
|
||||
return std::cin.eof() ? nullptr : mystrdup(retval.c_str());
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user