diff options
author | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2008-03-22 20:17:31 +0100 |
---|---|---|
committer | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2008-03-22 20:17:31 +0100 |
commit | c9732d7643b30e4414ce5e759019365e08a0ce10 (patch) | |
tree | 3ecb07400c3cf83233a2856da3fd06ba3bfbb0f1 /tools.cpp | |
parent | d08a134e8d0668ba3961041b02297d308e2f9f93 (diff) | |
download | vdr-plugin-live-c9732d7643b30e4414ce5e759019365e08a0ce10.tar.gz vdr-plugin-live-c9732d7643b30e4414ce5e759019365e08a0ce10.tar.bz2 |
fix for problems with old compilers
Diffstat (limited to 'tools.cpp')
-rw-r--r-- | tools.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -17,16 +17,17 @@ using namespace tnt; istream& operator>>( istream& is, tChannelID& ret ) { - string line; - if ( !getline( is, line ) ) { - if ( !is.eof() ) - is.setstate( ios::badbit ); - return is; - } - - if ( !line.empty() && !( ret = tChannelID::FromString( line.c_str() ) ).Valid() ) - is.setstate( ios::badbit ); - return is; + string line; + if ( !getline( is, line ) ) { + if ( !is.eof() ) + is.setstate( ios::badbit ); + else + is.clear(); + return is; + } + if ( !line.empty() && !( ret = tChannelID::FromString( line.c_str() ) ).Valid() ) + is.setstate( ios::badbit ); + return is; } namespace vdrlive { |