aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Neto <dneto@google.com>2018-11-19 14:41:28 -0500
committerDavid Neto <dneto@google.com>2018-11-19 14:43:18 -0500
commit016ef655f42c3d475d592150d759983beb2731ad (patch)
tree89e592e1a1388409c1186274d18a7a711de6f368 /src
parentc20ab2e6d0df49dc53433d62c5932ab08976f0e6 (diff)
downloadamber-016ef655f42c3d475d592150d759983beb2731ad.tar.gz
Avoid MSVC warning about conversion from size_t to long
Diffstat (limited to 'src')
-rw-r--r--src/tokenizer.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tokenizer.cc b/src/tokenizer.cc
index 9f55ec8..4c43c6c 100644
--- a/src/tokenizer.cc
+++ b/src/tokenizer.cc
@@ -155,9 +155,9 @@ std::unique_ptr<Token> Tokenizer::NextToken() {
// If the number isn't the whole token then move back so we can then parse
// the string portion.
- long diff = final_pos - tok_str.c_str();
+ auto diff = size_t(final_pos - tok_str.c_str());
if (diff > 0)
- current_position_ -= (tok_str.length() - static_cast<size_t>(diff));
+ current_position_ -= tok_str.length() - diff;
return tok;
}