diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-05-05 18:30:58 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-05-05 18:30:58 +0000 |
commit | 34cd4a484e532cc463fd5a4bf59b88d13c5467c1 (patch) | |
tree | eefdfb1d225da0317e7f7912079c430b5c3ed92c /lib/Support/FoldingSet.cpp | |
parent | b61bfdb56e1c018f10a2c1c9fb49d7e2a78ed24e (diff) |
Fix more -Wshorten-64-to-32 warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50659 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/FoldingSet.cpp')
-rw-r--r-- | lib/Support/FoldingSet.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Support/FoldingSet.cpp b/lib/Support/FoldingSet.cpp index bf50ed43df..6daa157af1 100644 --- a/lib/Support/FoldingSet.cpp +++ b/lib/Support/FoldingSet.cpp @@ -58,7 +58,7 @@ void FoldingSetNodeID::AddDouble(double D) { AddInteger(DoubleToBits(D)); } void FoldingSetNodeID::AddString(const std::string &String) { - unsigned Size = String.size(); + unsigned Size = static_cast<unsigned>(String.size()); Bits.push_back(Size); if (!Size) return; @@ -98,7 +98,7 @@ void FoldingSetNodeID::AddString(const std::string &String) { /// lookup the node in the FoldingSetImpl. unsigned FoldingSetNodeID::ComputeHash() const { // This is adapted from SuperFastHash by Paul Hsieh. - unsigned Hash = Bits.size(); + unsigned Hash = static_cast<unsigned>(Bits.size()); for (const unsigned *BP = &Bits[0], *E = BP+Bits.size(); BP != E; ++BP) { unsigned Data = *BP; Hash += Data & 0xFFFF; |