diff options
author | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2008-03-22 20:31:16 +0100 |
---|---|---|
committer | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2008-03-22 20:31:16 +0100 |
commit | a69f5f5873c2843780b9779f5eccf6e2a692da80 (patch) | |
tree | 76db2ba8ec534414913ccb56ea2cea9600afdab0 /tools.cpp | |
parent | c9732d7643b30e4414ce5e759019365e08a0ce10 (diff) | |
parent | d00342a76f291e9a01548b90ebfe3334959ce7aa (diff) | |
download | vdr-plugin-live-a69f5f5873c2843780b9779f5eccf6e2a692da80.tar.gz vdr-plugin-live-a69f5f5873c2843780b9779f5eccf6e2a692da80.tar.bz2 |
Merge commit 'tadi/master'cvs-commit-348
Conflicts:
tools.cpp
Diffstat (limited to 'tools.cpp')
-rw-r--r-- | tools.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -17,6 +17,7 @@ using namespace tnt; istream& operator>>( istream& is, tChannelID& ret ) { + /* alternativ implementation string line; if ( !getline( is, line ) ) { if ( !is.eof() ) @@ -28,6 +29,23 @@ istream& operator>>( istream& is, tChannelID& ret ) if ( !line.empty() && !( ret = tChannelID::FromString( line.c_str() ) ).Valid() ) is.setstate( ios::badbit ); return is; + */ + + string line; + if (!getline( is, line ) ) { + if (0 == is.gcount()) { + is.clear(is.rdstate() & ~ios::failbit); + return is; + } + 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; } namespace vdrlive { |