aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-08-07 12:34:59 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-08-07 12:34:59 +0300
commit5cf50c1c1afe4a3829f29f4af31d325ca305626f (patch)
tree81d997a079e92bd9d8096aded2c320cf9e6477cc
parent783ac77767350d0e6a37cc812e727de2c57f789e (diff)
Fix 'truncation of constant value' warning (VC)
-rw-r--r--libbutl/path.hxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/libbutl/path.hxx b/libbutl/path.hxx
index 342a188..e26d545 100644
--- a/libbutl/path.hxx
+++ b/libbutl/path.hxx
@@ -1192,9 +1192,13 @@ namespace std
for (size_t i (0), n (s.size ()); i != n; ++i)
{
hash ^= static_cast<size_t> (butl::lcase (s[i]));
+
+ // We are using C-style cast to suppress VC warning for 32-bit target
+ // (the value is compiled but not used).
+ //
hash *= sizeof (size_t) == 4
- ? static_cast<size_t>(16777619UL)
- : static_cast<size_t>(1099511628211ULL);
+ ? static_cast<size_t> (16777619UL)
+ : (size_t) 1099511628211ULL;
}
return hash;
#endif