From 59809ab61f6d70f59efee4648aa8e3b8d758c0fd Mon Sep 17 00:00:00 2001 From: Scott Giese Date: Mon, 23 Nov 2020 16:17:28 -0600 Subject: [PATCH] smell: avoid uncasting with left-shift --- simgear/bucket/newbucket.hxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/simgear/bucket/newbucket.hxx b/simgear/bucket/newbucket.hxx index 5f96593a..92b0297d 100644 --- a/simgear/bucket/newbucket.hxx +++ b/simgear/bucket/newbucket.hxx @@ -179,7 +179,7 @@ public: * @return tile index */ inline long int gen_index() const { - return ((lon + 180) << 14) + ((lat + 90) << 6) + (y << 3) + x; + return ((lon + 180) << 14) + ((lat + 90) << 6) + static_cast(y << 3) + x; } /** @@ -200,6 +200,7 @@ public: * @return base path in string form */ std::string gen_vpb_base() const; + std::string gen_vpb_base_alt() const; /** * @return the center lon of a tile.