diff options
author | Zufu Liu <unknown> | 2019-01-06 12:06:48 +1100 |
---|---|---|
committer | Zufu Liu <unknown> | 2019-01-06 12:06:48 +1100 |
commit | 5476eada003a1fbc182676c625b767efb2c16e6f (patch) | |
tree | aa2d89bf5f61cb359c8ff4a5b2dd14968965e50c /src/RunStyles.cxx | |
parent | 2e794b1ef52cb04e93f65906a266095bc8eae4f6 (diff) | |
download | scintilla-mirror-5476eada003a1fbc182676c625b767efb2c16e6f.tar.gz |
Bug [#2068]. Fix some clang-tidy warnings.
Diffstat (limited to 'src/RunStyles.cxx')
-rw-r--r-- | src/RunStyles.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/RunStyles.cxx b/src/RunStyles.cxx index 100ca399d..2bcf20892 100644 --- a/src/RunStyles.cxx +++ b/src/RunStyles.cxx @@ -250,7 +250,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; } @@ -300,7 +300,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."); } |