git://developer.intra2net.com
/
libi2ncommon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
29bc724
)
Silence compile warning about Undef not being handled in switch()
author
Thomas Jarosch
<thomas.jarosch@intra2net.com>
Mon, 17 Oct 2011 08:54:37 +0000 (10:54 +0200)
committer
Thomas Jarosch
<thomas.jarosch@intra2net.com>
Mon, 17 Oct 2011 08:54:37 +0000 (10:54 +0200)
src/tribool.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/tribool.cpp
b/src/tribool.cpp
index
403d3c8
..
0981fee
100644
(file)
--- a/
src/tribool.cpp
+++ b/
src/tribool.cpp
@@
-113,15
+113,22
@@
bool Tribool::operator!=(const Tribool& x) const
**/
Tribool Tribool::operator !() const
{
+ enum State rtn = Undef;
+
switch (Value)
{
case True:
- return False;
+ rtn = False;
+ break;
case False:
- return True;
+ rtn = True;
+ break;
+ case Undef:
+ default:
+ break;
} //lint !e787
- return Undef;
+ return rtn;
}
/**