diff options
author | Tad Marshall <tad@10gen.com> | 2012-02-25 21:23:21 -0500 |
---|---|---|
committer | Tad Marshall <tad@10gen.com> | 2012-02-25 21:23:21 -0500 |
commit | d1ca542817b79d4fb0e51b88f02d419a1a6462d7 (patch) | |
tree | 319c9d8e29f164dcb75a44d4995c7669bbbc849f /src/mongo/db/queryutil.h | |
parent | dc1d6ff920b3dd3fbab20da41409786cb5705bb2 (diff) | |
download | mongo-d1ca542817b79d4fb0e51b88f02d419a1a6462d7.tar.gz |
SERVER-4150 fix two Windows build warnings
Two cases of warning C4800: forcing value to bool 'true' or 'false' (performance warning).
Add a comparison with zero to explicitly make it bool.
Diffstat (limited to 'src/mongo/db/queryutil.h')
-rw-r--r-- | src/mongo/db/queryutil.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/queryutil.h b/src/mongo/db/queryutil.h index e16df5616df..3f87a28a135 100644 --- a/src/mongo/db/queryutil.h +++ b/src/mongo/db/queryutil.h @@ -85,7 +85,7 @@ namespace mongo { int getNumToReturn() const { return _ntoreturn; } bool wantMore() const { return _wantMore; } int getOptions() const { return _options; } - bool hasOption( int x ) const { return x & _options; } + bool hasOption( int x ) const { return ( x & _options ) != 0; } bool isExplain() const { return _explain; } bool isSnapshot() const { return _snapshot; } |