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

Side by Side Diff: tools/gn/value.cc

Issue 2769703007: Revert of Enable noexcept on Windows, use for a few move constructors. (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « tools/gn/value.h ('k') | url/gurl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "tools/gn/value.h" 5 #include "tools/gn/value.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 : type_(other.type_), 66 : type_(other.type_),
67 string_value_(other.string_value_), 67 string_value_(other.string_value_),
68 boolean_value_(other.boolean_value_), 68 boolean_value_(other.boolean_value_),
69 int_value_(other.int_value_), 69 int_value_(other.int_value_),
70 list_value_(other.list_value_), 70 list_value_(other.list_value_),
71 origin_(other.origin_) { 71 origin_(other.origin_) {
72 if (type() == SCOPE && other.scope_value_.get()) 72 if (type() == SCOPE && other.scope_value_.get())
73 scope_value_ = other.scope_value_->MakeClosure(); 73 scope_value_ = other.scope_value_->MakeClosure();
74 } 74 }
75 75
76 Value::Value(Value&& other) noexcept = default; 76 Value::Value(Value&& other) = default;
77 77
78 Value::~Value() { 78 Value::~Value() {
79 } 79 }
80 80
81 Value& Value::operator=(const Value& other) { 81 Value& Value::operator=(const Value& other) {
82 type_ = other.type_; 82 type_ = other.type_;
83 string_value_ = other.string_value_; 83 string_value_ = other.string_value_;
84 boolean_value_ = other.boolean_value_; 84 boolean_value_ = other.boolean_value_;
85 int_value_ = other.int_value_; 85 int_value_ = other.int_value_;
86 list_value_ = other.list_value_; 86 list_value_ = other.list_value_;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 // iteration code. 214 // iteration code.
215 return false; 215 return false;
216 default: 216 default:
217 return false; 217 return false;
218 } 218 }
219 } 219 }
220 220
221 bool Value::operator!=(const Value& other) const { 221 bool Value::operator!=(const Value& other) const {
222 return !operator==(other); 222 return !operator==(other);
223 } 223 }
OLDNEW
« no previous file with comments | « tools/gn/value.h ('k') | url/gurl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698