mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 22:03:03 +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)
|
if (service)
|
||||||
{
|
{
|
||||||
*service = 0;
|
*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);
|
length = BLB_get_data(tdbb, blob, buffer.getBuffer(length), length);
|
||||||
}
|
}
|
||||||
|
|
||||||
Firebird::string specificAttributes =
|
const Firebird::string specificAttributes((const char*) buffer.begin(), length);
|
||||||
Firebird::string((const char*) buffer.begin(), length);
|
|
||||||
Firebird::string newSpecificAttributes;
|
Firebird::string newSpecificAttributes;
|
||||||
|
|
||||||
// ASF: If setupCollationAttributes fail we store the original
|
// 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"
|
// 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;
|
Firebird::string newSpecificAttributes;
|
||||||
|
|
||||||
if (!IntlManager::setupCollationAttributes(
|
if (!IntlManager::setupCollationAttributes(
|
||||||
|
@ -173,7 +173,7 @@ vary* get_context(const vary* ns_vary, const vary* name_vary)
|
|||||||
return NULL;
|
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);
|
name_str(name_vary->vary_string, name_vary->vary_length);
|
||||||
|
|
||||||
// Handle system variables
|
// Handle system variables
|
||||||
@ -308,7 +308,7 @@ static SLONG set_context(const vary* ns_vary, const vary* name_vary, const vary*
|
|||||||
return 0;
|
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);
|
name_str(name_vary->vary_string, name_vary->vary_length);
|
||||||
|
|
||||||
if (ns_str == USER_SESSION_NAMESPACE)
|
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))
|
if (!INTL_builtin_lookup_charset(cs, charSetName, configInfo))
|
||||||
return INTL_BAD_STR_LENGTH;
|
return INTL_BAD_STR_LENGTH;
|
||||||
|
|
||||||
Firebird::string specificAttributes((const char*) src, srcLen);
|
const Firebird::string specificAttributes((const char*) src, srcLen);
|
||||||
Firebird::string newSpecificAttributes = specificAttributes;
|
Firebird::string newSpecificAttributes = specificAttributes;
|
||||||
|
|
||||||
if (IntlUtil::setupIcuAttributes(cs, specificAttributes, configInfo, newSpecificAttributes))
|
if (IntlUtil::setupIcuAttributes(cs, specificAttributes, configInfo, newSpecificAttributes))
|
||||||
|
@ -7299,7 +7299,7 @@ static void getUserInfo(UserId& user, const DatabaseOptions& options)
|
|||||||
else
|
else
|
||||||
#endif
|
#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_network_protocol.isEmpty() || options.dpb_remote_address.isEmpty() ? "" : "/") +
|
||||||
options.dpb_remote_address;
|
options.dpb_remote_address;
|
||||||
SecurityDatabase::verifyUser(name,
|
SecurityDatabase::verifyUser(name,
|
||||||
|
@ -312,7 +312,7 @@ void PluginManager::load_engine_plugins()
|
|||||||
enginePluginManager().addSearchPath(ENGINE_PLUGIN_DIR);
|
enginePluginManager().addSearchPath(ENGINE_PLUGIN_DIR);
|
||||||
enginePluginManager().loadAllPlugins();
|
enginePluginManager().loadAllPlugins();
|
||||||
|
|
||||||
Firebird::string entryPoint(ENGINE_PLUGIN_REGISTRATION_ENTRYPOINT);
|
const Firebird::string entryPoint(ENGINE_PLUGIN_REGISTRATION_ENTRYPOINT);
|
||||||
for (PluginManager::iterator itr = enginePluginManager().begin();
|
for (PluginManager::iterator itr = enginePluginManager().begin();
|
||||||
itr != enginePluginManager().end(); ++itr)
|
itr != enginePluginManager().end(); ++itr)
|
||||||
{
|
{
|
||||||
|
@ -530,7 +530,7 @@ Service* SVC_attach(USHORT service_length,
|
|||||||
|
|
||||||
|
|
||||||
/* Find the service by looking for an exact match. */
|
/* 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));
|
service_length ? service_length : strlen(service_name));
|
||||||
serv_entry* serv;
|
serv_entry* serv;
|
||||||
for (serv = services; serv->serv_name; serv++) {
|
for (serv = services; serv->serv_name; serv++) {
|
||||||
@ -606,7 +606,7 @@ Service* SVC_attach(USHORT service_length,
|
|||||||
TEXT name[129]; // unused after retrieved
|
TEXT name[129]; // unused after retrieved
|
||||||
int id, group, node_id;
|
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_network_protocol.isEmpty() ||
|
||||||
options.spb_remote_address.isEmpty() ? "" : "/") +
|
options.spb_remote_address.isEmpty() ? "" : "/") +
|
||||||
options.spb_remote_address;
|
options.spb_remote_address;
|
||||||
|
@ -95,7 +95,7 @@ bool putSpecTag(char**& av, Firebird::ClumpletWriter& spb, unsigned int tag,
|
|||||||
if (! *av)
|
if (! *av)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Firebird::string s(prepareSwitch(*av++));
|
const Firebird::string s(prepareSwitch(*av++));
|
||||||
for (; sw->name; ++sw)
|
for (; sw->name; ++sw)
|
||||||
{
|
{
|
||||||
if (s == sw->name)
|
if (s == sw->name)
|
||||||
@ -184,7 +184,7 @@ bool populateSpbFromSwitches(char**& av,
|
|||||||
if (! *av)
|
if (! *av)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Firebird::string s(prepareSwitch(*av));
|
const Firebird::string s(prepareSwitch(*av));
|
||||||
|
|
||||||
for (; sw->name; ++sw)
|
for (; sw->name; ++sw)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user