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

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

Issue 1728303003: tools/gn: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« tools/gn/label.h ('K') | « tools/gn/token.h ('k') | no next file » | 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/token.h" 5 #include "tools/gn/token.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 Token::Token() : type_(INVALID), value_() { 9 Token::Token() : type_(INVALID), value_() {
10 } 10 }
11 11
12 Token::Token(const Location& location, 12 Token::Token(const Location& location,
13 Type t, 13 Type t,
14 const base::StringPiece& v) 14 const base::StringPiece& v)
15 : type_(t), 15 : type_(t),
16 value_(v), 16 value_(v),
17 location_(location) { 17 location_(location) {
18 } 18 }
19 19
20 Token::Token(const Token& other) = default;
21
20 bool Token::IsIdentifierEqualTo(const char* v) const { 22 bool Token::IsIdentifierEqualTo(const char* v) const {
21 return type_ == IDENTIFIER && value_ == v; 23 return type_ == IDENTIFIER && value_ == v;
22 } 24 }
23 25
24 bool Token::IsStringEqualTo(const char* v) const { 26 bool Token::IsStringEqualTo(const char* v) const {
25 return type_ == STRING && value_ == v; 27 return type_ == STRING && value_ == v;
26 } 28 }
OLDNEW
« tools/gn/label.h ('K') | « tools/gn/token.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698