aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/RunStyles.cxx
diff options
context:
space:
mode:
authorZufu Liu <unknown>2019-01-06 12:06:48 +1100
committerZufu Liu <unknown>2019-01-06 12:06:48 +1100
commit24b2acfddea20bbcdb6c714dcdc96389ab4f54b5 (patch)
tree1a438cf0677801a264f5d6047118b001286b0d89 /src/RunStyles.cxx
parentb7937365db8e0a049155fda1b31d2c3ff5321547 (diff)
downloadscintilla-mirror-24b2acfddea20bbcdb6c714dcdc96389ab4f54b5.tar.gz
Backport: Bug [#2068]. Fix some clang-tidy warnings.
Backport of changeset 7195:ce4394f12c76.
Diffstat (limited to 'src/RunStyles.cxx')
-rw-r--r--src/RunStyles.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/RunStyles.cxx b/src/RunStyles.cxx
index ad3084a01..115f51a9a 100644
--- a/src/RunStyles.cxx
+++ b/src/RunStyles.cxx
@@ -249,7 +249,7 @@ DISTANCE RunStyles<DISTANCE, STYLE>::Runs() const noexcept {
template <typename DISTANCE, typename STYLE>
bool RunStyles<DISTANCE, STYLE>::AllSame() const noexcept {
- for (int run = 1; run < starts->Partitions(); run++) {
+ for (DISTANCE run = 1; run < starts->Partitions(); run++) {
if (styles->ValueAt(run) != styles->ValueAt(run - 1))
return false;
}
@@ -299,7 +299,7 @@ void RunStyles<DISTANCE, STYLE>::Check() const {
if (styles->ValueAt(styles->Length()-1) != 0) {
throw std::runtime_error("RunStyles: Unused style at end changed.");
}
- for (int j=1; j<styles->Length()-1; j++) {
+ for (ptrdiff_t j=1; j<styles->Length()-1; j++) {
if (styles->ValueAt(j) == styles->ValueAt(j-1)) {
throw std::runtime_error("RunStyles: Style of a partition same as previous.");
}