From 8a2a83acc707d37fa6eec09700cc2e52dacc1f25 Mon Sep 17 00:00:00 2001 From: Daredevil2002 Date: Fri, 3 Mar 2023 12:15:05 +0300 Subject: [PATCH] Fix -Wignored-qualifiers, -Wdeprecated-copy-with-user-provided-copy warnings --- src/draco/core/bounding_box.cc | 2 +- src/draco/core/bounding_box.h | 2 +- src/draco/core/draco_index_type.h | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/draco/core/bounding_box.cc b/src/draco/core/bounding_box.cc index 8acd6687..979a01ab 100644 --- a/src/draco/core/bounding_box.cc +++ b/src/draco/core/bounding_box.cc @@ -27,7 +27,7 @@ BoundingBox::BoundingBox() BoundingBox::BoundingBox(const Vector3f &min_point, const Vector3f &max_point) : min_point_(min_point), max_point_(max_point) {} -const bool BoundingBox::IsValid() const { +bool BoundingBox::IsValid() const { return GetMinPoint()[0] != std::numeric_limits::max() && GetMinPoint()[1] != std::numeric_limits::max() && GetMinPoint()[2] != std::numeric_limits::max() && diff --git a/src/draco/core/bounding_box.h b/src/draco/core/bounding_box.h index 697a73b6..05a202cd 100644 --- a/src/draco/core/bounding_box.h +++ b/src/draco/core/bounding_box.h @@ -41,7 +41,7 @@ class BoundingBox { // Checks if the bounding box object was created with the default constructor // then never updated. Internally, checks if the bounding box minimum and // maximum points hold the largest positive and smallest negative values. - const bool IsValid() const; + bool IsValid() const; // Conditionally updates the bounding box with a given |new_point|. void Update(const Vector3f &new_point) { diff --git a/src/draco/core/draco_index_type.h b/src/draco/core/draco_index_type.h index d9dd3f64..51976eac 100644 --- a/src/draco/core/draco_index_type.h +++ b/src/draco/core/draco_index_type.h @@ -67,6 +67,7 @@ class IndexType { typedef ValueTypeT ValueType; constexpr IndexType() : value_(ValueTypeT()) {} + constexpr IndexType(const IndexType &i) : value_(i.value_) {} constexpr explicit IndexType(ValueTypeT value) : value_(value) {} constexpr ValueTypeT value() const { return value_; }