MXS-2208 Move trim-functions from maxscale to maxbase

log.h now includes string.hh, which is conceptually wrong, but
log.h will shortly disappear and be superceded by log.hh.
This commit is contained in:
Johan Wikman
2018-12-05 14:54:41 +02:00
parent 60cbeaf287
commit 1b5b789342
25 changed files with 352 additions and 339 deletions

View File

@ -642,7 +642,7 @@ static void fix_section_name(char* section)
void fix_object_name(char* name)
{
squeeze_whitespace(name);
trim(name);
mxb::trim(name);
replace_whitespace(name);
}
@ -4352,7 +4352,7 @@ int config_parse_server_list(const char* servers, char*** output_array)
* be trimmed of whitespace. */
char srv_list_tmp[strlen(servers) + 1];
strcpy(srv_list_tmp, servers);
trim(srv_list_tmp);
mxb::trim(srv_list_tmp);
bool error = false;
int output_ind = 0;
@ -4796,8 +4796,8 @@ bool config_parse_disk_space_threshold(MxsDiskSpaceThreshold* pDisk_space_thresh
string path = entry.substr(0, j);
string tail = entry.substr(j + 1);
mxs::trim(path);
mxs::trim(tail);
mxb::trim(path);
mxb::trim(tail);
if (!path.empty() && !tail.empty())
{