Added explanatory comments. Replaced tabs with spaces.
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@1154 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
ac16c24fb5
commit
efe104663e
1 changed files with 8 additions and 5 deletions
|
@ -135,6 +135,7 @@ int main( int argc, const char * argv[] )
|
|||
// Should not assert since caller stores return value ...
|
||||
BoolReturn checkBool = CheckRequired();
|
||||
// and then deliberately ignores it before destructor runs.
|
||||
// Ignore any compiler warnings that says code does not check return value.
|
||||
(bool)checkBool;
|
||||
cout << "Called CheckRequired, stored return value, and ignored it."
|
||||
<< endl;
|
||||
|
@ -143,12 +144,14 @@ int main( int argc, const char * argv[] )
|
|||
{
|
||||
// This should not assert since caller deliberately chooses to not
|
||||
// check return value by casting to return value to correct type.
|
||||
// Ignore any compiler warnings that says code does not check return value.
|
||||
(bool)CheckRequired();
|
||||
}
|
||||
|
||||
{
|
||||
// This should not assert since caller deliberately chooses to not
|
||||
// check return value by casting to return value to correct type.
|
||||
// Ignore any compiler warnings that says code does not check return value.
|
||||
(bool)CheckRequired( false );
|
||||
cout << "Made a nested call to CheckRequired." << endl;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue