mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 14:03:07 +01:00
Misc tweaks with Firebird::string.
This commit is contained in:
parent
b83f218f40
commit
3a7d93f658
@ -451,7 +451,7 @@ static int api_gbak(int argc,
|
||||
}
|
||||
|
||||
|
||||
Firebird::string svc_name(service ? service : "");
|
||||
const Firebird::string svc_name(service ? service : "");
|
||||
if (service)
|
||||
{
|
||||
*service = 0;
|
||||
|
@ -2249,8 +2249,7 @@ static bool create_collation(thread_db* tdbb, SSHORT phase, DeferredWork* work,
|
||||
length = BLB_get_data(tdbb, blob, buffer.getBuffer(length), length);
|
||||
}
|
||||
|
||||
Firebird::string specificAttributes =
|
||||
Firebird::string((const char*) buffer.begin(), length);
|
||||
const Firebird::string specificAttributes((const char*) buffer.begin(), length);
|
||||
Firebird::string newSpecificAttributes;
|
||||
|
||||
// ASF: If setupCollationAttributes fail we store the original
|
||||
|
@ -335,7 +335,7 @@ void DYN_define_collation( Global* gbl, const UCHAR** ptr)
|
||||
// msg: 222: "Invalid collation attributes"
|
||||
}
|
||||
|
||||
Firebird::string s = Firebird::IntlUtil::generateSpecificAttributes(cs, map);
|
||||
const Firebird::string s = Firebird::IntlUtil::generateSpecificAttributes(cs, map);
|
||||
Firebird::string newSpecificAttributes;
|
||||
|
||||
if (!IntlManager::setupCollationAttributes(
|
||||
|
@ -173,7 +173,7 @@ vary* get_context(const vary* ns_vary, const vary* name_vary)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Firebird::string ns_str(ns_vary->vary_string, ns_vary->vary_length),
|
||||
const Firebird::string ns_str(ns_vary->vary_string, ns_vary->vary_length),
|
||||
name_str(name_vary->vary_string, name_vary->vary_length);
|
||||
|
||||
// Handle system variables
|
||||
@ -308,7 +308,7 @@ static SLONG set_context(const vary* ns_vary, const vary* name_vary, const vary*
|
||||
return 0;
|
||||
}
|
||||
|
||||
Firebird::string ns_str(ns_vary->vary_string, ns_vary->vary_length),
|
||||
const Firebird::string ns_str(ns_vary->vary_string, ns_vary->vary_length),
|
||||
name_str(name_vary->vary_string, name_vary->vary_length);
|
||||
|
||||
if (ns_str == USER_SESSION_NAMESPACE)
|
||||
|
@ -1762,7 +1762,7 @@ ULONG INTL_builtin_setup_attributes(const ASCII* textTypeName, const ASCII* char
|
||||
if (!INTL_builtin_lookup_charset(cs, charSetName, configInfo))
|
||||
return INTL_BAD_STR_LENGTH;
|
||||
|
||||
Firebird::string specificAttributes((const char*) src, srcLen);
|
||||
const Firebird::string specificAttributes((const char*) src, srcLen);
|
||||
Firebird::string newSpecificAttributes = specificAttributes;
|
||||
|
||||
if (IntlUtil::setupIcuAttributes(cs, specificAttributes, configInfo, newSpecificAttributes))
|
||||
|
@ -7299,7 +7299,7 @@ static void getUserInfo(UserId& user, const DatabaseOptions& options)
|
||||
else
|
||||
#endif
|
||||
{
|
||||
Firebird::string remote = options.dpb_network_protocol +
|
||||
const Firebird::string remote = options.dpb_network_protocol +
|
||||
(options.dpb_network_protocol.isEmpty() || options.dpb_remote_address.isEmpty() ? "" : "/") +
|
||||
options.dpb_remote_address;
|
||||
SecurityDatabase::verifyUser(name,
|
||||
|
@ -312,7 +312,7 @@ void PluginManager::load_engine_plugins()
|
||||
enginePluginManager().addSearchPath(ENGINE_PLUGIN_DIR);
|
||||
enginePluginManager().loadAllPlugins();
|
||||
|
||||
Firebird::string entryPoint(ENGINE_PLUGIN_REGISTRATION_ENTRYPOINT);
|
||||
const Firebird::string entryPoint(ENGINE_PLUGIN_REGISTRATION_ENTRYPOINT);
|
||||
for (PluginManager::iterator itr = enginePluginManager().begin();
|
||||
itr != enginePluginManager().end(); ++itr)
|
||||
{
|
||||
|
@ -530,7 +530,7 @@ Service* SVC_attach(USHORT service_length,
|
||||
|
||||
|
||||
/* Find the service by looking for an exact match. */
|
||||
Firebird::string misc_buf(service_name,
|
||||
const Firebird::string misc_buf(service_name,
|
||||
service_length ? service_length : strlen(service_name));
|
||||
serv_entry* serv;
|
||||
for (serv = services; serv->serv_name; serv++) {
|
||||
@ -606,7 +606,7 @@ Service* SVC_attach(USHORT service_length,
|
||||
TEXT name[129]; // unused after retrieved
|
||||
int id, group, node_id;
|
||||
|
||||
Firebird::string remote = options.spb_network_protocol +
|
||||
const Firebird::string remote = options.spb_network_protocol +
|
||||
(options.spb_network_protocol.isEmpty() ||
|
||||
options.spb_remote_address.isEmpty() ? "" : "/") +
|
||||
options.spb_remote_address;
|
||||
|
@ -95,7 +95,7 @@ bool putSpecTag(char**& av, Firebird::ClumpletWriter& spb, unsigned int tag,
|
||||
if (! *av)
|
||||
return false;
|
||||
|
||||
Firebird::string s(prepareSwitch(*av++));
|
||||
const Firebird::string s(prepareSwitch(*av++));
|
||||
for (; sw->name; ++sw)
|
||||
{
|
||||
if (s == sw->name)
|
||||
@ -184,7 +184,7 @@ bool populateSpbFromSwitches(char**& av,
|
||||
if (! *av)
|
||||
return false;
|
||||
|
||||
Firebird::string s(prepareSwitch(*av));
|
||||
const Firebird::string s(prepareSwitch(*av));
|
||||
|
||||
for (; sw->name; ++sw)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user