summaryrefslogtreecommitdiff
path: root/tools.cpp
diff options
context:
space:
mode:
authorChristian Wieninger <cwieninger (at) gmx (dot) de>2008-03-22 20:17:31 +0100
committerChristian Wieninger <cwieninger (at) gmx (dot) de>2008-03-22 20:17:31 +0100
commitc9732d7643b30e4414ce5e759019365e08a0ce10 (patch)
tree3ecb07400c3cf83233a2856da3fd06ba3bfbb0f1 /tools.cpp
parentd08a134e8d0668ba3961041b02297d308e2f9f93 (diff)
downloadvdr-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.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/tools.cpp b/tools.cpp
index 3a80ff7..cca1b9d 100644
--- a/tools.cpp
+++ b/tools.cpp
@@ -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 {