Fix test builds
parent
3fa6db9603
commit
fad6a37537
|
|
@ -230,7 +230,7 @@ template <typename T>
|
|||
inline typename T::mapped_type get_ptr_in_map(const T& inmap, typename T::key_type const& key)
|
||||
{
|
||||
// Typedef here avoids warnings because of new c++ naming rules.
|
||||
typedef T::const_iterator map_iter;
|
||||
typedef typename T::const_iterator map_iter;
|
||||
map_iter iter = inmap.find(key);
|
||||
if(iter == inmap.end())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,18 +38,23 @@
|
|||
|
||||
|
||||
// Baked-in return values for getString()
|
||||
std::map< std::string, std::string > gString;
|
||||
std::map< std::string, std::string, std::less<>> gString;
|
||||
|
||||
// Baked-in return values for getCountString()
|
||||
// map of pairs of input xml_desc and integer count
|
||||
typedef std::pair< std::string, int > count_string_t;
|
||||
std::map< count_string_t, std::string > gCountString;
|
||||
|
||||
std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args, bool def_string)
|
||||
std::string LLTrans::getString(const std::string_view xml_desc, const LLStringUtil::format_map_t& args, bool def_string)
|
||||
{
|
||||
std::string text = gString[xml_desc];
|
||||
LLStringUtil::format(text, args);
|
||||
return text;
|
||||
auto it = gString.find(xml_desc);
|
||||
if (it != gString.end())
|
||||
{
|
||||
std::string text = it->second;
|
||||
LLStringUtil::format(text, args);
|
||||
return text;
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
std::string LLTrans::getCountString(const std::string& language, const std::string& xml_desc, S32 count)
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ LLProgressView * LLViewerWindow::getProgressView(void) const { return 0; }
|
|||
|
||||
LLViewerWindow* gViewerWindow;
|
||||
|
||||
std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args, bool def_string)
|
||||
std::string LLTrans::getString(std::string_view xml_desc, const LLStringUtil::format_map_t& args, bool def_string)
|
||||
{
|
||||
return std::string("test_trans");
|
||||
}
|
||||
|
|
@ -235,7 +235,7 @@ static LLEventPump * gTOSReplyPump = NULL;
|
|||
LLPointer<LLSecAPIHandler> gSecAPIHandler;
|
||||
|
||||
//static
|
||||
LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, bool focus)
|
||||
LLFloater* LLFloaterReg::showInstance(std::string_view name, const LLSD& key, bool focus)
|
||||
{
|
||||
gTOSType = name;
|
||||
gTOSReplyPump = &LLEventPumps::instance().obtain(key["reply_pump"]);
|
||||
|
|
|
|||
|
|
@ -46,10 +46,10 @@ static const char * const TEST_FILENAME("llslurl_test.xml");
|
|||
class LLTrans
|
||||
{
|
||||
public:
|
||||
static std::string getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args, bool def_string = false);
|
||||
static std::string getString(std::string_view xml_desc, const LLStringUtil::format_map_t& args, bool def_string = false);
|
||||
};
|
||||
|
||||
std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args, bool def_string)
|
||||
std::string LLTrans::getString(std::string_view xml_desc, const LLStringUtil::format_map_t& args, bool def_string)
|
||||
{
|
||||
return std::string();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,10 +45,10 @@ static const char * const TEST_FILENAME("llviewernetwork_test.xml");
|
|||
class LLTrans
|
||||
{
|
||||
public:
|
||||
static std::string getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args, bool def_string = false);
|
||||
static std::string getString(std::string_view xml_desc, const LLStringUtil::format_map_t& args, bool def_string = false);
|
||||
};
|
||||
|
||||
std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args, bool def_string)
|
||||
std::string LLTrans::getString(std::string_view xml_desc, const LLStringUtil::format_map_t& args, bool def_string)
|
||||
{
|
||||
std::string grid_label = std::string();
|
||||
if(xml_desc == "AgniGridLabel")
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ void LLWorldMipmap::equalizeBoostLevels() { }
|
|||
LLPointer<LLViewerFetchedTexture> LLWorldMipmap::getObjectsTile(U32 grid_x, U32 grid_y, S32 level, bool load) { return NULL; }
|
||||
|
||||
// Stub other stuff
|
||||
std::string LLTrans::getString(const std::string &, const LLStringUtil::format_map_t&, bool def_string) { return std::string("test_trans"); }
|
||||
std::string LLTrans::getString(std::string_view, const LLStringUtil::format_map_t&, bool def_string) { return std::string("test_trans"); }
|
||||
void LLUIString::updateResult() const { }
|
||||
void LLUIString::setArg(const std::string& , const std::string& ) { }
|
||||
void LLUIString::assign(const std::string& ) { }
|
||||
|
|
|
|||
Loading…
Reference in New Issue