diff options
author | Neil <nyamatongwe@gmail.com> | 2020-03-27 09:16:06 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2020-03-27 09:16:06 +1100 |
commit | 30748b957f1fbce6c79c7ac48e8b377cd6c7fd5a (patch) | |
tree | f63b654633f26805744fe1a1f1dd7bbb674ab6b1 /lexlib/PropSetSimple.cxx | |
parent | 6788d9d6d53438b92bbed78b4cb3d3ad9c581ae2 (diff) | |
download | scintilla-mirror-30748b957f1fbce6c79c7ac48e8b377cd6c7fd5a.tar.gz |
Avoid casts by returning size_t from GetExpanded.
Diffstat (limited to 'lexlib/PropSetSimple.cxx')
-rw-r--r-- | lexlib/PropSetSimple.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lexlib/PropSetSimple.cxx b/lexlib/PropSetSimple.cxx index 5ce353c71..6e1312527 100644 --- a/lexlib/PropSetSimple.cxx +++ b/lexlib/PropSetSimple.cxx @@ -137,10 +137,10 @@ static int ExpandAllInPlace(const PropSetSimple &props, std::string &withVars, i return maxExpands; } -int PropSetSimple::GetExpanded(const char *key, char *result) const { +size_t PropSetSimple::GetExpanded(const char *key, char *result) const { std::string val = Get(key); ExpandAllInPlace(*this, val, 100, VarChain(key)); - const int n = static_cast<int>(val.size()); + const size_t n = val.size(); if (result) { memcpy(result, val.c_str(), n+1); } |