aboutsummaryrefslogtreecommitdiff
path: root/disassembler_ztf.cc
diff options
context:
space:
mode:
authorSamuel Huang <huangs@chromium.org>2021-08-13 15:42:26 +0000
committerCopybara-Service <copybara-worker@google.com>2021-08-13 08:54:54 -0700
commitf137bf4b5542b966abc4c08762c5e60b21913f4d (patch)
tree09c6bdbdfaa7dd2f09d32a791a6aa364b0eeb2ba /disassembler_ztf.cc
parentfa10b05c4854c6d8a603ee47c2a213cbc23f8646 (diff)
downloadzucchini-f137bf4b5542b966abc4c08762c5e60b21913f4d.tar.gz
[Zucchini] Replace DISALLOW_* macros with =delete versions.
This CL replaces * 30 instances of DISALLOW_COPY_AND_ASSIGN(Foo), * 1 instance of DISALLOW_IMPLICIT_CONSTRUCTORS(Foo), in Zucchini with: Foo() = delete; // DISALLOW_IMPLICIT_CONSTRUCTORS only. Foo(const Foo&) = delete; const Foo& operator=(const Foo&) = delete; All base/macros.h includes are removed. Bug: 1010217 Change-Id: I13b3d5ed04f04e5c0b209d59e70ac018c5f4938c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3093198 Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org> Commit-Queue: Samuel Huang <huangs@chromium.org> Cr-Commit-Position: refs/heads/master@{#911751} NOKEYCHECK=True GitOrigin-RevId: ba0e1f56993c535faa59e2ca02c371bae2ebbb20
Diffstat (limited to 'disassembler_ztf.cc')
-rw-r--r--disassembler_ztf.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/disassembler_ztf.cc b/disassembler_ztf.cc
index f822d8b..dfe9045 100644
--- a/disassembler_ztf.cc
+++ b/disassembler_ztf.cc
@@ -11,7 +11,6 @@
#include <numeric>
#include "base/check_op.h"
-#include "base/macros.h"
#include "base/numerics/checked_math.h"
#include "base/numerics/safe_conversions.h"
#include "components/zucchini/algorithm.h"
@@ -88,6 +87,9 @@ class ZtfParser {
ztf::kMaxDimValue);
}
+ ZtfParser(const ZtfParser&) = delete;
+ const ZtfParser& operator=(const ZtfParser&) = delete;
+
// Attempts to match an absolute reference at |offset|. If successful then
// assigns the result to |abs_lc| and returns true. Otherwise returns false.
// An absolute reference takes the form:
@@ -164,8 +166,6 @@ class ZtfParser {
const offset_t hi_;
const ZtfConfig config_;
offset_t offset_ = 0;
-
- DISALLOW_COPY_AND_ASSIGN(ZtfParser);
};
/******** ZtfWriter ********/
@@ -180,6 +180,9 @@ class ZtfWriter {
val_bound_(
static_cast<ztf::dim_t>(std::pow(10, config_.digits_per_dim))) {}
+ ZtfWriter(const ZtfWriter&) = delete;
+ const ZtfWriter& operator=(const ZtfWriter&) = delete;
+
// Write an absolute reference |abs_ref| at |offset|. Note that references
// that would overwrite a newline are skipped as this would invalidate all
// the other reference line numbers.
@@ -268,7 +271,6 @@ class ZtfWriter {
// Bound on numeric values, as limited by |config_.digits_per_dim|.
const ztf::dim_t val_bound_;
offset_t offset_ = 0;
- DISALLOW_COPY_AND_ASSIGN(ZtfWriter);
};
// Specialization of ReferenceReader for reading text references.