Index: tools/clang/blink_gc_plugin/JsonWriter.h |
diff --git a/tools/clang/blink_gc_plugin/JsonWriter.h b/tools/clang/blink_gc_plugin/JsonWriter.h |
index 3fe79103bbadbadc21770b707584ba1648462ed4..d1615639fba8b73251db193b903de340db2976f7 100644 |
--- a/tools/clang/blink_gc_plugin/JsonWriter.h |
+++ b/tools/clang/blink_gc_plugin/JsonWriter.h |
@@ -18,7 +18,7 @@ class JsonWriter { |
*os_ << "["; |
state_.push(false); |
} |
- void OpenList(const std::string key) { |
+ void OpenList(const std::string& key) { |
Write(key); |
*os_ << ":"; |
OpenList(); |
@@ -40,15 +40,15 @@ class JsonWriter { |
Separator(); |
*os_ << val; |
} |
- void Write(const std::string val) { |
+ void Write(const std::string& val) { |
Separator(); |
*os_ << "\"" << val << "\""; |
} |
- void Write(const std::string key, const size_t val) { |
+ void Write(const std::string& key, const size_t val) { |
Separator(); |
*os_ << "\"" << key << "\":" << val; |
} |
- void Write(const std::string key, const std::string val) { |
+ void Write(const std::string& key, const std::string val) { |
hans
2016/05/25 17:45:57
Should probably pass 'val' by reference to while w
ki.stfu
2016/05/25 17:53:07
Missed that, thanks :)
|
Separator(); |
*os_ << "\"" << key << "\":\"" << val << "\""; |
} |