summaryrefslogtreecommitdiff
path: root/db/geo/2d.cpp
diff options
context:
space:
mode:
authorgregs <greg@10gen.com>2011-07-27 15:34:45 -0400
committergregs <greg@10gen.com>2011-07-27 15:34:45 -0400
commit9551880b41944ef200d244f616b46466b906691c (patch)
tree2498b39ff4fb32696864ad692067f8ab3933a0d3 /db/geo/2d.cpp
parent0084b65772783eefb88f9666ac0c716a37abf1d8 (diff)
downloadmongo-9551880b41944ef200d244f616b46466b906691c.tar.gz
fix for 32 bit geo
Diffstat (limited to 'db/geo/2d.cpp')
-rw-r--r--db/geo/2d.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/db/geo/2d.cpp b/db/geo/2d.cpp
index ad0798ce40a..281380db2bd 100644
--- a/db/geo/2d.cpp
+++ b/db/geo/2d.cpp
@@ -933,7 +933,9 @@ namespace mongo {
// Exact check with particular data fields
////
// Can add multiple points
- _found += addSpecific( node , keyP, keyOk == BORDER, keyD, newDoc );
+ int diff = addSpecific( node , keyP, keyOk == BORDER, keyD, newDoc );
+ if( diff > 0 ) _found += diff;
+ else _found -= -diff;
}
@@ -1722,7 +1724,9 @@ namespace mongo {
_points.erase( startErase, _points.end() );
- _found += _points.size() - prevSize;
+ int diff = _points.size() - prevSize;
+ if( diff > 0 ) _found += diff;
+ else _found -= -diff;
}