The open source OpenXR runtime

d/opengloves: Clarify encoding constants

authored by

Daniel Willmott and committed by
Moses Turner
c83c21ef f953ed78

+4 -4
+4 -4
src/xrt/drivers/opengloves/encoding/alpha_encoding.cpp
··· 90 90 return opengloves_alpha_encoding_key_characters.find(character) != std::string::npos; 91 91 } 92 92 93 - static const std::map<std::string, int> opengloves_alpha_encoding_key_string{ 93 + static const std::map<std::string, int> opengloves_alpha_encoding_input_key_string{ 94 94 {"A", OPENGLOVES_ALPHA_ENCODING_FinThumb}, // whole thumb curl (default curl value for thumb joints) 95 95 {"(AB)", OPENGLOVES_ALPHA_ENCODING_FinSplayThumb}, // whole thumb splay thumb joint 3 (doesn't exist, but keeps 96 96 // consistency with the other fingers ··· 180 180 181 181 // Even if the value is empty we still want to use the key, it means that we have a button that 182 182 // is pressed (it only appears in the packet if it is) 183 - if (opengloves_alpha_encoding_key_string.find(key) != 184 - opengloves_alpha_encoding_key_string.end()) 185 - result.insert_or_assign(opengloves_alpha_encoding_key_string.at(key), value); 183 + if (opengloves_alpha_encoding_input_key_string.find(key) != 184 + opengloves_alpha_encoding_input_key_string.end()) 185 + result.insert_or_assign(opengloves_alpha_encoding_input_key_string.at(key), value); 186 186 else 187 187 U_LOG_W("Unable to insert key: %s into input map as it was not found", key.c_str()); 188 188 } else