Move unescaped_name function to FSCommon
parent
117e21c02f
commit
3d00f56ea0
|
|
@ -85,6 +85,17 @@ bool is_irc_me_prefix(const std::string& text)
|
|||
return (prefix == "/me " || prefix == "/me'");
|
||||
}
|
||||
|
||||
std::string unescape_name(const std::string& name)
|
||||
{
|
||||
// bugfix for SL-46920: preventing filenames that break stuff.
|
||||
char * curl_str = curl_unescape(name.c_str(), name.size());
|
||||
std::string unescaped_name(curl_str);
|
||||
curl_free(curl_str);
|
||||
curl_str = NULL;
|
||||
|
||||
return unescaped_name;
|
||||
}
|
||||
|
||||
std::string FSCommon::applyAutoCloseOoc(std::string message)
|
||||
{
|
||||
if (!gSavedSettings.getBOOL("AutoCloseOOC"))
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ const F32 AVATAR_UNKNOWN_RANGE = -1.f;
|
|||
void report_to_nearby_chat(const std::string& message);
|
||||
std::string format_string(std::string text, const LLStringUtil::format_map_t& args);
|
||||
bool is_irc_me_prefix(const std::string& text);
|
||||
std::string unescape_name(const std::string& name);
|
||||
|
||||
namespace FSCommon
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
#include "fscommon.h"
|
||||
#include "lggbeammaps.h"
|
||||
#include "lggbeamscolors.h"
|
||||
#include "llagent.h"
|
||||
|
|
@ -27,17 +28,6 @@
|
|||
|
||||
lggBeamMaps gLggBeamMaps;
|
||||
|
||||
std::string unescape_name(const std::string& name)
|
||||
{
|
||||
// bugfix for SL-46920: preventing filenames that break stuff.
|
||||
char * curl_str = curl_unescape(name.c_str(), name.size());
|
||||
std::string unescaped_name(curl_str);
|
||||
curl_free(curl_str);
|
||||
curl_str = NULL;
|
||||
|
||||
return unescaped_name;
|
||||
}
|
||||
|
||||
F32 hueToRgb(F32 val1In, F32 val2In, F32 valHUeIn)
|
||||
{
|
||||
while (valHUeIn < 0.0f)
|
||||
|
|
@ -70,7 +60,7 @@ F32 hueToRgb(F32 val1In, F32 val2In, F32 valHUeIn)
|
|||
|
||||
void hslToRgb(F32 hValIn, F32 sValIn, F32 lValIn, F32& rValOut, F32& gValOut, F32& bValOut)
|
||||
{
|
||||
if (sValIn < 0.00001f)
|
||||
if (sValIn < F_ALMOST_ZERO)
|
||||
{
|
||||
rValOut = lValIn;
|
||||
gValOut = lValIn;
|
||||
|
|
@ -400,4 +390,3 @@ void lggBeamMaps::updateBeamChat(const LLVector3d& currentPos)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,9 +18,6 @@
|
|||
#include "llviewerprecompiledheaders.h"
|
||||
#include "lggbeamscolors.h"
|
||||
|
||||
#include "llfile.h"
|
||||
#include "llsdserialize.h"
|
||||
|
||||
lggBeamsColors lggBeamsColors::fromLLSD(const LLSD& inputData)
|
||||
{
|
||||
lggBeamsColors toReturn;
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@
|
|||
// [RLVa:KB] - Checked: RLVa-2.4 (@setenv)
|
||||
#include "rlvactions.h"
|
||||
// [/RLVa:KB]
|
||||
#include "fscommon.h"
|
||||
|
||||
//=========================================================================
|
||||
namespace
|
||||
|
|
@ -828,7 +829,6 @@ LLEnvironment::LLEnvironment():
|
|||
}
|
||||
// <FS:Beq> OpenSim legacy Windlight setting support
|
||||
#ifdef OPENSIM
|
||||
std::string unescape_name(const std::string& name);
|
||||
void LLEnvironment::loadLegacyPresets()
|
||||
{
|
||||
// [EEPMERGE]
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@
|
|||
#include "llvoavatarself.h"
|
||||
#include "rlvhandler.h"
|
||||
|
||||
std::string unescape_name(const std::string& name);
|
||||
class FSSettingsCollector : public LLInventoryCollectFunctor
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
Loading…
Reference in New Issue