summaryrefslogtreecommitdiffstats
path: root/Source/cmString.hxx
diff options
context:
space:
mode:
authorMatthew Woehlke <matthew.woehlke@kitware.com>2023-08-29 19:57:24 (GMT)
committerMatthew Woehlke <matthew.woehlke@kitware.com>2023-08-29 19:57:24 (GMT)
commit7b3464320f24167d09592fe05b04ea9b6677fd9d (patch)
treece0c099c22667ab7c73546c342501b2fa602c17f /Source/cmString.hxx
parentb938e7de9c21986a67dc54852ac971e5e1499be6 (diff)
downloadCMake-7b3464320f24167d09592fe05b04ea9b6677fd9d.zip
CMake-7b3464320f24167d09592fe05b04ea9b6677fd9d.tar.gz
CMake-7b3464320f24167d09592fe05b04ea9b6677fd9d.tar.bz2
Reduce sign conversion warnings
Add some static casts to make explicit some sign conversions in order to avoid warnings about the same. This is by no means an attempt to fix all such warnings, but these instances were especially egregious as they would be raised across many source files. Also change a post-increment of an iterator to pre-increment. At worst, this does nothing, but pre-increment is potentially more efficient.
Diffstat (limited to 'Source/cmString.hxx')
-rw-r--r--Source/cmString.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmString.hxx b/Source/cmString.hxx
index 86b21c8..1994c2c 100644
--- a/Source/cmString.hxx
+++ b/Source/cmString.hxx
@@ -493,8 +493,8 @@ public:
char ch)
{
std::string out;
- out.reserve((first - this->view_.begin()) + count2 +
- (this->view_.end() - last));
+ out.reserve(static_cast<size_type>(first - this->view_.begin()) + count2 +
+ static_cast<size_type>(this->view_.end() - last));
out.append(this->view_.begin(), first);
out.append(count2, ch);
out.append(last, this->view_.end());