Constified static Strings declared in functions to make sure they are safely initialized.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3418 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
fe28900209
commit
803fcb09fb
|
@ -305,7 +305,7 @@ static inline bool callLogicSelect(ClientLogic* logic, Window* wnd, const String
|
|||
static inline bool hasOverride(const NamedList* params, String& name, String& handle,
|
||||
bool& only, bool& prefer, bool& ignore, bool& bailout)
|
||||
{
|
||||
static String s_ignoreString = "ignore";
|
||||
static const String s_ignoreString = "ignore";
|
||||
|
||||
if (!params)
|
||||
return false;
|
||||
|
@ -2008,7 +2008,7 @@ bool Client::postpone(const Message& msg, int id, bool copyUserData)
|
|||
// Handle actions from user interface
|
||||
bool Client::action(Window* wnd, const String& name, NamedList* params)
|
||||
{
|
||||
static String sect = "action";
|
||||
static const String sect = "action";
|
||||
|
||||
XDebug(ClientDriver::self(),DebugAll,"Action '%s' in window (%p,%s)",
|
||||
name.c_str(),wnd,wnd ? wnd->id().c_str() : "");
|
||||
|
@ -2039,7 +2039,7 @@ bool Client::action(Window* wnd, const String& name, NamedList* params)
|
|||
// Deal with toggle widget events
|
||||
bool Client::toggle(Window* wnd, const String& name, bool active)
|
||||
{
|
||||
static String sect = "toggle";
|
||||
static const String sect = "toggle";
|
||||
|
||||
XDebug(ClientDriver::self(),DebugAll,
|
||||
"Toggle name='%s' active='%s' in window (%p,%s)",
|
||||
|
@ -2073,7 +2073,7 @@ bool Client::toggle(Window* wnd, const String& name, bool active)
|
|||
// Handle selection changes (list selection changes, focus changes ...)
|
||||
bool Client::select(Window* wnd, const String& name, const String& item, const String& text)
|
||||
{
|
||||
static String sect = "select";
|
||||
static const String sect = "select";
|
||||
|
||||
XDebug(ClientDriver::self(),DebugAll,
|
||||
"Select name='%s' item='%s' in window (%p,%s)",
|
||||
|
@ -2238,7 +2238,7 @@ void Client::installRelay(const char* name, int id, int prio)
|
|||
// Process an IM message
|
||||
bool Client::imExecute(Message& msg)
|
||||
{
|
||||
static String sect = "miscellaneous";
|
||||
static const String sect = "miscellaneous";
|
||||
|
||||
if (Client::isClientMsg(msg))
|
||||
return false;
|
||||
|
@ -2336,7 +2336,7 @@ bool Client::buildOutgoingChannel(NamedList& params)
|
|||
// Call execute handler called by the driver
|
||||
bool Client::callIncoming(Message& msg, const String& dest)
|
||||
{
|
||||
static String sect = "miscellaneous";
|
||||
static const String sect = "miscellaneous";
|
||||
|
||||
XDebug(ClientDriver::self(),DebugAll,"Client::callIncoming [%p]",this);
|
||||
// if we are in single line mode and we have already a channel, reject the call
|
||||
|
|
|
@ -92,7 +92,7 @@ static inline void setAccParam(NamedList& params, const String& prefix,
|
|||
static inline void setImageParam(NamedList& p, const char* param,
|
||||
const String& image)
|
||||
{
|
||||
static String suffix = "_image";
|
||||
static const String suffix = "_image";
|
||||
p.setParam(param + suffix,Client::s_skinPath + image);
|
||||
}
|
||||
|
||||
|
@ -163,8 +163,8 @@ static bool checkParam(NamedList& p, const char* param, const String& widget,
|
|||
// Utility: activate the calls page
|
||||
static inline void activatePageCalls(ClientLogic* logic, Window* wnd = 0)
|
||||
{
|
||||
static String s_buttonCalls = "ctrlCalls";
|
||||
static String s_toggleCalls = "selectitem:framePages:PageCalls";
|
||||
static const String s_buttonCalls = "ctrlCalls";
|
||||
static const String s_toggleCalls = "selectitem:framePages:PageCalls";
|
||||
Client::self()->setCheck(s_buttonCalls,true,wnd);
|
||||
logic->toggle(wnd,s_toggleCalls,true);
|
||||
}
|
||||
|
@ -996,7 +996,7 @@ bool DefaultLogic::select(Window* wnd, const String& name, const String& item,
|
|||
}
|
||||
// Handle protocol selection in edit window: activate advanced options
|
||||
if (name == "acc_protocol") {
|
||||
static String proto = "acc_proto_spec";
|
||||
static const String proto = "acc_proto_spec";
|
||||
if (!Client::self())
|
||||
return false;
|
||||
bool adv = false;
|
||||
|
|
Loading…
Reference in New Issue