Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(800)

Unified Diff: runtime/vm/json_stream.h

Issue 23903034: - Disallow copy constructors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/heap_histogram.cc ('k') | runtime/vm/json_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/json_stream.h
===================================================================
--- runtime/vm/json_stream.h (revision 27345)
+++ runtime/vm/json_stream.h (working copy)
@@ -85,10 +85,10 @@
explicit JSONObject(JSONStream* stream) : stream_(stream) {
stream_->OpenObject();
}
- JSONObject(const JSONObject& obj, const char* name) : stream_(obj.stream_) {
+ JSONObject(const JSONObject* obj, const char* name) : stream_(obj->stream_) {
stream_->OpenObject(name);
}
- explicit JSONObject(const JSONArray& arr);
+ explicit JSONObject(const JSONArray* arr);
~JSONObject() {
stream_->CloseObject();
@@ -113,6 +113,9 @@
JSONStream* stream_;
friend class JSONArray;
+
+ DISALLOW_ALLOCATION();
+ DISALLOW_COPY_AND_ASSIGN(JSONObject);
};
@@ -121,10 +124,10 @@
explicit JSONArray(JSONStream* stream) : stream_(stream) {
stream_->OpenArray();
}
- JSONArray(const JSONObject& obj, const char* name) : stream_(obj.stream_) {
+ JSONArray(const JSONObject* obj, const char* name) : stream_(obj->stream_) {
stream_->OpenArray(name);
}
- explicit JSONArray(const JSONArray& arr) : stream_(arr.stream_) {
+ explicit JSONArray(const JSONArray* arr) : stream_(arr->stream_) {
stream_->OpenArray();
}
~JSONArray() {
@@ -144,6 +147,9 @@
JSONStream* stream_;
friend class JSONObject;
+
+ DISALLOW_ALLOCATION();
+ DISALLOW_COPY_AND_ASSIGN(JSONArray);
};
} // namespace dart
« no previous file with comments | « runtime/vm/heap_histogram.cc ('k') | runtime/vm/json_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698