From c144073d8a50a16d51d014e532c9493be394afa3 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Fri, 4 Sep 2020 13:17:27 -0400 Subject: [PATCH] A few small cleanups --- indra/llcommon/is_approx_equal_fraction.h | 2 +- indra/llcommon/llsd.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/llcommon/is_approx_equal_fraction.h b/indra/llcommon/is_approx_equal_fraction.h index 4a9b2e2725f..6a567c78cb2 100644 --- a/indra/llcommon/is_approx_equal_fraction.h +++ b/indra/llcommon/is_approx_equal_fraction.h @@ -49,7 +49,7 @@ inline BOOL is_approx_equal_fraction_impl(FTYPE x, FTYPE y, U32 frac_bits) FTYPE diff = (FTYPE) fabs(x - y); S32 diffInt = (S32) diff; - S32 diffFracTolerance = (S32) ((diff - (FTYPE) diffInt) * (1 << frac_bits)); + S32 diffFracTolerance = (S32) ((diff - (FTYPE) diffInt) * (1U << frac_bits)); // if integer portion is not equal, not enough bits were used for packing // so error out since either the use case is not correct OR there is diff --git a/indra/llcommon/llsd.cpp b/indra/llcommon/llsd.cpp index 14fb7cc64a7..d5b657d7ce1 100644 --- a/indra/llcommon/llsd.cpp +++ b/indra/llcommon/llsd.cpp @@ -456,8 +456,8 @@ namespace const LLSD& ImplMap::ref(const LLSD::String& k) const { - DataMap::const_iterator i = mData.lower_bound(k); - if (i == mData.end() || mData.key_comp()(k, i->first)) + DataMap::const_iterator i = mData.find(k); + if (i == mData.end()) { return undef(); } -- GitLab