Commit 41b3ead7 authored by Vladislav Belov's avatar Vladislav Belov Committed by Commit Bot

[GN] Uses the consistent way to disallow assign and copy

The code has several places where the manual disallowing
of copy and assignment is used. It stands out from style
and may lead to a compilation error, if you're building
under a specific platform/compiler.

R=sdefresne@chromium.org

Bug: None
Change-Id: I6df0fec2d575675565a78e63ea8efab854c8a8f6
Reviewed-on: https://chromium-review.googlesource.com/690000Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505997}
parent 18e58e4a
......@@ -125,7 +125,7 @@ class BuildSettings {
std::unique_ptr<std::set<SourceFile>> exec_script_whitelist_;
BuildSettings& operator=(const BuildSettings& other); // Disallow.
DISALLOW_ASSIGN(BuildSettings);
};
#endif // TOOLS_GN_BUILD_SETTINGS_H_
......@@ -7,6 +7,7 @@
#include <string>
#include "base/macros.h"
#include "tools/gn/item.h"
// Represents a named pool in the dependency graph.
......@@ -18,9 +19,6 @@ class Pool : public Item {
using Item::Item;
~Pool() override;
Pool(const Pool&) = delete;
Pool& operator=(const Pool&) = delete;
// Item implementation.
Pool* AsPool() override;
const Pool* AsPool() const override;
......@@ -36,6 +34,8 @@ class Pool : public Item {
std::string GetNinjaName(bool include_toolchain) const;
int64_t depth_ = 0;
DISALLOW_COPY_AND_ASSIGN(Pool);
};
#endif // TOOLS_GN_POOL_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment