We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/home/folkert/Projects2/libego/source/gtp/gtp.cpp: In member function ‘bool Gtp::Io::IsEmpty()’: /home/folkert/Projects2/libego/source/gtp/gtp.cpp:42:13: error: cannot convert ‘std::istringstream’ {aka ‘std::__cxx11::basic_istringstream<char>’} to ‘bool’ in initialization 42 | bool ok = in; | ^~ | | | std::istringstream {aka std::__cxx11::basic_istringstream<char>} make[2]: *** [gtp/CMakeFiles/gtp.dir/build.make:82: gtp/CMakeFiles/gtp.dir/gtp.cpp.o] Error 1
I propose the following (untested, it compiles though):
index 58dde30..9712241 100644 --- a/source/gtp/gtp.cpp +++ b/source/gtp/gtp.cpp @@ -39,10 +39,10 @@ bool Io::IsEmpty() { string s; std::streampos pos = in.tellg(); in >> s; - bool ok = in; + bool ok = s.empty(); in.seekg(pos); in.clear(); - return !ok; + return ok; } void Io::PrepareIn () {
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I propose the following (untested, it compiles though):
The text was updated successfully, but these errors were encountered: