Bug 904148: Move ReplaceData into an anonymous namespace, to fix build warning. r=Waldo
authorDaniel Holbert <dholbert@cs.stanford.edu>
Mon, 12 Aug 2013 11:44:39 -0700
changeset 142338 12e7e6c547b9a449f980e34761a696fd3317e77a
parent 142337 d54129b46ca9224a90f1720bef6b8da575a90d85
child 142339 806efb2cd1fcdf6244b30cd0f66c290407b0ff6b
push id25093
push usercbook@mozilla.com
push dateTue, 13 Aug 2013 10:34:53 +0000
treeherdermozilla-central@a0e613b4f4d8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersWaldo
bugs904148
milestone26.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 904148: Move ReplaceData into an anonymous namespace, to fix build warning. r=Waldo
js/src/jsstr.cpp
--- a/js/src/jsstr.cpp
+++ b/js/src/jsstr.cpp
@@ -2000,16 +2000,18 @@ class RopeBuilder {
         return !!res;
     }
 
     inline JSString *result() {
         return res;
     }
 };
 
+namespace {
+
 struct ReplaceData
 {
     ReplaceData(JSContext *cx)
       : str(cx), g(cx), lambda(cx), elembase(cx), repstr(cx),
         dollarRoot(cx, &dollar), dollarEndRoot(cx, &dollarEnd),
         fig(cx, NullValue()), sb(cx)
     {}
 
@@ -2024,16 +2026,18 @@ struct ReplaceData
     SkipRoot           dollarEndRoot;  /* ditto */
     int                leftIndex;      /* left context index in str->chars */
     JSSubString        dollarStr;      /* for "$$" InterpretDollar result */
     bool               calledBack;     /* record whether callback has been called */
     FastInvokeGuard    fig;            /* used for lambda calls, also holds arguments */
     StringBuffer       sb;             /* buffer built during DoMatch */
 };
 
+} /* anonymous namespace */
+
 static bool
 ReplaceRegExp(JSContext *cx, RegExpStatics *res, ReplaceData &rdata);
 
 static bool
 DoMatchForReplaceLocal(JSContext *cx, RegExpStatics *res, Handle<JSLinearString*> linearStr,
                        RegExpShared &re, ReplaceData &rdata)
 {
     size_t charsLen = linearStr->length();