aboutsummaryrefslogtreecommitdiff
path: root/binary_data_histogram.h
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 /binary_data_histogram.h
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 'binary_data_histogram.h')
-rw-r--r--binary_data_histogram.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/binary_data_histogram.h b/binary_data_histogram.h
index 3950ab7..201f90a 100644
--- a/binary_data_histogram.h
+++ b/binary_data_histogram.h
@@ -11,7 +11,6 @@
#include <memory>
#include <string>
-#include "base/macros.h"
#include "components/zucchini/buffer_view.h"
namespace zucchini {
@@ -24,6 +23,8 @@ namespace zucchini {
class OutlierDetector {
public:
OutlierDetector();
+ OutlierDetector(const OutlierDetector&) = delete;
+ const OutlierDetector& operator=(const OutlierDetector&) = delete;
~OutlierDetector();
// Incorporates |sample| into mean and standard deviation.
@@ -47,8 +48,6 @@ class OutlierDetector {
double sum_of_squares_ = 0;
double mean_ = 0;
double standard_deviation_ = 0;
-
- DISALLOW_COPY_AND_ASSIGN(OutlierDetector);
};
// A class to compute similarity score between binary data. The heuristic here
@@ -58,6 +57,8 @@ class OutlierDetector {
class BinaryDataHistogram {
public:
BinaryDataHistogram();
+ BinaryDataHistogram(const BinaryDataHistogram&) = delete;
+ const BinaryDataHistogram& operator=(const BinaryDataHistogram&) = delete;
~BinaryDataHistogram();
// Attempts to compute the histogram, returns true iff successful.
@@ -82,8 +83,6 @@ class BinaryDataHistogram {
// are stored as signed values to simplify computing the distance between two
// histograms.
std::unique_ptr<int32_t[]> histogram_;
-
- DISALLOW_COPY_AND_ASSIGN(BinaryDataHistogram);
};
} // namespace zucchini