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

Unified Diff: tools/gn/scope.h

Issue 964203002: tools/gn: Fix errors found by Facebook's flint tool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix chromium-style plugin errors Created 5 years, 10 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 | « tools/gn/pattern.h ('k') | tools/gn/scope.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/scope.h
diff --git a/tools/gn/scope.h b/tools/gn/scope.h
index 4494458e227a478ba72022e046d8e25950328243..da3768bc13fa53cd45e29a480ec3602bec53400a 100644
--- a/tools/gn/scope.h
+++ b/tools/gn/scope.h
@@ -48,12 +48,10 @@ class Scope {
// destruction.
class ProgrammaticProvider {
public:
- ProgrammaticProvider(Scope* scope) : scope_(scope) {
+ explicit ProgrammaticProvider(Scope* scope) : scope_(scope) {
scope_->AddProvider(this);
}
- ~ProgrammaticProvider() {
- scope_->RemoveProvider(this);
- }
+ virtual ~ProgrammaticProvider();
// Returns a non-null value if the given value can be programmatically
// generated, or NULL if there is none.
@@ -96,11 +94,11 @@ class Scope {
};
// Creates an empty toplevel scope.
- Scope(const Settings* settings);
+ explicit Scope(const Settings* settings);
// Creates a dependent scope.
- Scope(Scope* parent);
- Scope(const Scope* parent);
+ explicit Scope(Scope* parent);
+ explicit Scope(const Scope* parent);
~Scope();
@@ -298,7 +296,7 @@ class Scope {
struct Record {
Record() : used(false) {}
- Record(const Value& v) : used(false), value(v) {}
+ explicit Record(const Value& v) : used(false), value(v) {}
bool used; // Set to true when the variable is used.
Value value;
« no previous file with comments | « tools/gn/pattern.h ('k') | tools/gn/scope.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698