summaryrefslogtreecommitdiff
path: root/src/mongo/db/dur.h
diff options
context:
space:
mode:
authorTad Marshall <tad@10gen.com>2012-08-02 05:55:24 -0400
committerTad Marshall <tad@10gen.com>2012-08-31 11:44:37 -0400
commit15624a7a7e60ce1f50fc50f6cba54398b2af17d2 (patch)
treea6f830ee48e31ad7a0a69bd13fe97fa42c16b94e /src/mongo/db/dur.h
parent1f8725142aee6cd4598ff360f638055e44557bec (diff)
downloadmongo-15624a7a7e60ce1f50fc50f6cba54398b2af17d2.tar.gz
SERVER-6908 Don't pass strings by value
Change lots of code to take <string> arguments by const ref instead of by value; minor changes to surrounding code.
Diffstat (limited to 'src/mongo/db/dur.h')
-rw-r--r--src/mongo/db/dur.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/dur.h b/src/mongo/db/dur.h
index ffacf90f591..9914264c83e 100644
--- a/src/mongo/db/dur.h
+++ b/src/mongo/db/dur.h
@@ -34,7 +34,7 @@ namespace mongo {
is created first, and the journal will just replay the creation if the create didn't
happen because of crashing.
*/
- virtual void createdFile(string filename, unsigned long long len) = 0;
+ virtual void createdFile(const std::string& filename, unsigned long long len) = 0;
/** Declarations of write intent.
@@ -168,7 +168,7 @@ namespace mongo {
void* writingAtOffset(void *buf, unsigned ofs, unsigned len) { return buf; }
void* writingRangesAtOffsets(void *buf, const vector< pair< long long, unsigned > > &ranges) { return buf; }
void declareWriteIntent(void *, unsigned);
- void createdFile(string filename, unsigned long long len) { }
+ void createdFile(const std::string& filename, unsigned long long len) { }
bool awaitCommit() { return false; }
bool commitNow() { return false; }
bool commitIfNeeded(bool) { return false; }
@@ -182,7 +182,7 @@ namespace mongo {
void* writingAtOffset(void *buf, unsigned ofs, unsigned len);
void* writingRangesAtOffsets(void *buf, const vector< pair< long long, unsigned > > &ranges);
void declareWriteIntent(void *, unsigned);
- void createdFile(string filename, unsigned long long len);
+ void createdFile(const std::string& filename, unsigned long long len);
bool awaitCommit();
bool commitNow();
bool aCommitIsNeeded() const;