Commit 3424d0f8 for tesseract
commit 3424d0f8abeff1d6d8836c1e8ab5688494d66b6e
Author: Stefan Weil <sw@weilnetz.de>
Date: Thu Jun 4 18:45:10 2026 +0200
Use more `constexpr`
Signed-off-by: Stefan Weil <sw@weilnetz.de>
diff --git a/src/ccstruct/points.h b/src/ccstruct/points.h
index f3adfbf6..3110a017 100644
--- a/src/ccstruct/points.h
+++ b/src/ccstruct/points.h
@@ -55,11 +55,11 @@ public:
bool Serialize(TFile *f) const;
/// access function
- TDimension x() const {
+ constexpr TDimension x() const {
return xcoord;
}
/// access_function
- TDimension y() const {
+ constexpr TDimension y() const {
return ycoord;
}
@@ -105,7 +105,7 @@ public:
}
/// test equality
- bool operator==(const ICOORD &other) const {
+ constexpr bool operator==(const ICOORD &other) const {
return xcoord == other.xcoord && ycoord == other.ycoord;
}
/// test inequality