-// Copyright 2015 The Chromium Authors. All rights reserved.
+// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <vector>
#include "base/gtest_prod_util.h"
-#include "base/macros.h"
+#include "base/memory/raw_ptr.h"
#include "courgette/image_utils.h"
namespace courgette {
class SimpleIndexAssigner {
public:
explicit SimpleIndexAssigner(LabelVector* labels);
+
+ SimpleIndexAssigner(const SimpleIndexAssigner&) = delete;
+ SimpleIndexAssigner& operator=(const SimpleIndexAssigner&) = delete;
+
~SimpleIndexAssigner();
// Scans forward to assign successive indexes to Labels, using existing
private:
// The target LabelVector, owned by the caller.
- LabelVector* labels_;
+ raw_ptr<LabelVector> labels_;
// A bound on indexes.
int num_index_ = 0;
// Tracker for index usage to ensure uniqueness of indexes.
std::vector<bool> available_;
-
- DISALLOW_COPY_AND_ASSIGN(SimpleIndexAssigner);
};
LabelManager();
+
+ LabelManager(const LabelManager&) = delete;
+ LabelManager& operator=(const LabelManager&) = delete;
+
~LabelManager();
// Returns an exclusive upper bound for all assigned indexes in |labels|.
// The main list of Label instances, sorted by the |rva_| member.
LabelVector labels_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(LabelManager);
};
} // namespace courgette