Permalink
Browse files

spaces, not tabs.

  • Loading branch information...
1 parent 62554d0 commit 366553c97e26b82c24fb28265b70c8b11be6f0a9 @milkie milkie committed Nov 16, 2011
Showing with 17 additions and 17 deletions.
  1. +14 −14 db/matcher.cpp
  2. +1 −1 db/matcher.h
  3. +2 −2 jstests/regexb.js
View
@@ -180,20 +180,20 @@ namespace mongo {
void Matcher::addRegex(const char *fieldName, const char *regex, const char *flags, bool isNot) {
- RegexMatcher rm;
- rm._re.reset( new pcrecpp::RE(regex, flags2options(flags)) );
- rm._fieldName = fieldName;
- rm._regex = regex;
- rm._flags = flags;
- rm._isNot = isNot;
- _regexs.push_back(rm);
-
- if (!isNot) { //TODO something smarter
- bool purePrefix;
- string prefix = simpleRegex(regex, flags, &purePrefix);
- if (purePrefix)
- rm._prefix = prefix;
- }
+ RegexMatcher rm;
+ rm._re.reset( new pcrecpp::RE(regex, flags2options(flags)) );
+ rm._fieldName = fieldName;
+ rm._regex = regex;
+ rm._flags = flags;
+ rm._isNot = isNot;
+ _regexs.push_back(rm);
+
+ if (!isNot) { //TODO something smarter
+ bool purePrefix;
+ string prefix = simpleRegex(regex, flags, &purePrefix);
+ if (purePrefix)
+ rm._prefix = prefix;
+ }
}
bool Matcher::addOp( const BSONElement &e, const BSONElement &fe, bool isNot, const char *& regex, const char *&flags ) {
View
@@ -209,7 +209,7 @@ namespace mongo {
*/
bool _atomic;
- vector<RegexMatcher> _regexs;
+ vector<RegexMatcher> _regexs;
// so we delete the mem when we're done:
vector< shared_ptr< BSONObjBuilder > > _builders;
View
@@ -5,8 +5,8 @@ t.drop();
t.save( {a:'a',b:'b',c:'c',d:'d',e:'e'} );
-assert.eq( 1, t.count( {a:/a/,b:/b/,c:/c/,d:/d/,e:/e/} ) );
-assert.eq( 0, t.count( {a:/a/,b:/b/,c:/c/,d:/d/,e:/barf/} ) ); // SERVER-969
+assert.eq( 1, t.count( {a:/a/,b:/b/,c:/c/,d:/d/,e:/e/} ) );
+assert.eq( 0, t.count( {a:/a/,b:/b/,c:/c/,d:/d/,e:/barf/} ) );

0 comments on commit 366553c

Please sign in to comment.