diff --git a/ccstruct/seam.cpp b/ccstruct/seam.cpp index 8260639b75..51c6f11125 100644 --- a/ccstruct/seam.cpp +++ b/ccstruct/seam.cpp @@ -62,7 +62,7 @@ void SEAM::CombineWith(const SEAM& other) { location_ += other.location_; location_ /= 2; - for (int s = 0; s < other.num_splits_ && num_splits_ < kMaxNumSplits; ++s) + for (uint8_t s = 0; s < other.num_splits_ && num_splits_ < kMaxNumSplits; ++s) splits_[num_splits_++] = other.splits_[s]; } diff --git a/ccstruct/seam.h b/ccstruct/seam.h index 4bafbcb843..da538bee8e 100644 --- a/ccstruct/seam.h +++ b/ccstruct/seam.h @@ -178,7 +178,7 @@ class SEAM { private: // Maximum number of splits that a SEAM can hold. - static const int kMaxNumSplits = 3; + static const uint8_t kMaxNumSplits = 3; // Priority of this split. Lower is better. float priority_; // Position of the middle of the seam. @@ -189,7 +189,7 @@ class SEAM { inT8 widthp_; inT8 widthn_; // Number of splits_ that are used. - inT8 num_splits_; + uint8_t num_splits_; // Set of pairs of points that are the ends of each split in the SEAM. SPLIT splits_[kMaxNumSplits]; };