Fix formatting of new(std::nothrow)

The code previously formatted everything as `new( std::nothrow)`.
This commit is contained in:
Markus Mäkelä 2018-10-04 21:40:34 +03:00
parent 1af43d4ff5
commit 75ea1b6ea1
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19
47 changed files with 109 additions and 110 deletions

View File

@ -337,5 +337,4 @@ MXS_MONITOR_API MonitorApi<MonitorInstance>::s_api =
&MonitorApi<MonitorInstance>::diagnostics,
&MonitorApi<MonitorInstance>::diagnostics_json,
};
}

View File

@ -654,5 +654,4 @@ uint64_t get_byteN(const uint8_t* ptr, int bytes);
* @return The next byte after the stored value
*/
uint8_t* set_byteN(uint8_t* ptr, uint64_t value, int bytes);
}

View File

@ -36,10 +36,10 @@
namespace
{
const char* ZUSER = "mxs2043_user";
const char* ZUSER = "mxs2043_user";
const char* ZPASSWORD = "mxs2043_user";
const char* ZTABLE = "test.mxs2043";
const char* ZCOLUMN = "col";
const char* ZTABLE = "test.mxs2043";
const char* ZCOLUMN = "col";
void drop_table(TestConnections& test, MYSQL* pMysql, bool silent = false)
{
@ -132,7 +132,6 @@ void run_test(TestConnections& test)
mysql_close(pMysql);
}
}
}
int main(int argc, char* argv[])

View File

@ -65,11 +65,11 @@ void create_event(TestConnections& test)
const char create_event_query[] = "CREATE EVENT %s ON SCHEDULE EVERY 1 SECOND "
"DO UPDATE test.t1 SET c1 = c1 + 1;";
if ((test.try_query(conn, EVENT_SHCEDULER, "ON") == 0) &&
(test.try_query(conn, "CREATE OR REPLACE TABLE test.t1(c1 INT);") == 0) &&
(test.try_query(conn, USE_TEST) == 0) &&
(test.try_query(conn, "INSERT INTO t1 VALUES (1);") == 0) &&
(test.try_query(conn, create_event_query, EVENT_NAME) == 0))
if ((test.try_query(conn, EVENT_SHCEDULER, "ON") == 0)
&& (test.try_query(conn, "CREATE OR REPLACE TABLE test.t1(c1 INT);") == 0)
&& (test.try_query(conn, USE_TEST) == 0)
&& (test.try_query(conn, "INSERT INTO t1 VALUES (1);") == 0)
&& (test.try_query(conn, create_event_query, EVENT_NAME) == 0))
{
test.repl->sync_slaves();
// Check that the event is running and increasing the value
@ -84,9 +84,9 @@ void delete_event(TestConnections& test)
test.maxscales->connect_maxscale(0);
MYSQL* conn = test.maxscales->conn_rwsplit[0];
if ((test.try_query(conn, EVENT_SHCEDULER, "OFF") == 0) &&
(test.try_query(conn, USE_TEST) == 0) &&
(test.try_query(conn, DELETE_EVENT, EVENT_NAME) == 0))
if ((test.try_query(conn, EVENT_SHCEDULER, "OFF") == 0)
&& (test.try_query(conn, USE_TEST) == 0)
&& (test.try_query(conn, DELETE_EVENT, EVENT_NAME) == 0))
{
test.repl->sync_slaves();
test.expect(!field_is_incrementing(test),

View File

@ -28,7 +28,6 @@ static std::string required_repl_version;
static std::string required_galera_version;
static bool restart_galera = false;
static bool multiple_maxscales = false;
}
static void perform_manual_action(const char* zMessage)
@ -131,18 +130,18 @@ TestConnections::TestConnections(int argc, char* argv[])
static struct option long_options[] =
{
{"help", no_argument, 0, 'h' },
{"verbose", no_argument, 0, 'v' },
{"silent", no_argument, 0, 'n' },
{"quiet", no_argument, 0, 'q' },
{"no-maxscale-start", no_argument, 0, 's' },
{"no-maxscale-init", no_argument, 0, 'i' },
{"no-nodes-check", no_argument, 0, 'r' },
{"restart-galera", no_argument, 0, 'g' },
{"no-timeouts", no_argument, 0, 'z' },
{"no-galera", no_argument, 0, 'y' },
{"local-maxscale", optional_argument, 0, 'l' },
{0, 0, 0, 0 }
{"help", no_argument, 0, 'h' },
{"verbose", no_argument, 0, 'v' },
{"silent", no_argument, 0, 'n' },
{"quiet", no_argument, 0, 'q' },
{"no-maxscale-start", no_argument, 0, 's' },
{"no-maxscale-init", no_argument, 0, 'i' },
{"no-nodes-check", no_argument, 0, 'r' },
{"restart-galera", no_argument, 0, 'g' },
{"no-timeouts", no_argument, 0, 'z' },
{"no-galera", no_argument, 0, 'y' },
{"local-maxscale", optional_argument, 0, 'l' },
{0, 0, 0, 0 }
};
int c;
@ -212,11 +211,13 @@ TestConnections::TestConnections(int argc, char* argv[])
case 'l':
{
const char* local_ip = optarg ? optarg : "127.0.0.1";
printf("MaxScale assumed to be running locally; not started and logs not downloaded. IP: %s\n", local_ip);
printf(
"MaxScale assumed to be running locally; not started and logs not downloaded. IP: %s\n",
local_ip);
maxscale_init = false;
no_maxscale_log_copy = true;
local_maxscale=true;
local_maxscale = true;
setenv("maxscale_IP", local_ip, true);
setenv("maxscale_network", local_ip, true);
@ -977,7 +978,8 @@ int TestConnections::start_binlog(int m)
if (!local_maxscale)
{
binlog =
open_conn_no_db(maxscales->binlog_port[m], maxscales->IP[m], repl->user_name, repl->password, ssl);
open_conn_no_db(maxscales->binlog_port[m], maxscales->IP[m], repl->user_name, repl->password,
ssl);
execute_query(binlog, "stop slave");
execute_query(binlog, "reset slave all");
mysql_close(binlog);
@ -987,7 +989,8 @@ int TestConnections::start_binlog(int m)
}
else
{
perform_manual_action("Perform the equivalent of 'STOP SLAVE; RESET SLAVE ALL' and stop local Maxscale");
perform_manual_action(
"Perform the equivalent of 'STOP SLAVE; RESET SLAVE ALL' and stop local Maxscale");
}
for (i = 0; i < repl->N; i++)

View File

@ -482,7 +482,7 @@ bool mxb_log_init(const char* ident,
filepath = std::string(logdir) + "/" + suffix;
}
this_unit.sMessage_registry.reset(new( std::nothrow) MessageRegistry);
this_unit.sMessage_registry.reset(new(std::nothrow) MessageRegistry);
switch (target)
{

View File

@ -108,7 +108,7 @@ std::unique_ptr<Logger> FileLogger::create(const std::string& filename)
if (fd != -1)
{
logger.reset(new( std::nothrow) FileLogger(fd, filename));
logger.reset(new(std::nothrow) FileLogger(fd, filename));
if (logger)
{

View File

@ -152,7 +152,7 @@ MessageQueue* MessageQueue::create(Handler* pHandler)
mxb_strerror(errno));
}
#endif
pThis = new( std::nothrow) MessageQueue(pHandler, read_fd, write_fd);
pThis = new(std::nothrow) MessageQueue(pHandler, read_fd, write_fd);
if (!pThis)
{

View File

@ -487,7 +487,7 @@ bool Worker::execute(function<void ()> func, mxb::Semaphore* pSem, execute_mode_
};
bool rval = false;
CustomTask* task = new( std::nothrow) CustomTask(func);
CustomTask* task = new(std::nothrow) CustomTask(func);
if (task)
{

View File

@ -259,7 +259,7 @@ public:
static QcSqliteInfo* create(uint32_t collect)
{
QcSqliteInfo* pInfo = new( std::nothrow) QcSqliteInfo(collect);
QcSqliteInfo* pInfo = new(std::nothrow) QcSqliteInfo(collect);
mxb_assert(pInfo);
return pInfo;
}

View File

@ -237,7 +237,7 @@ int handle_client(void* cls,
{
if (*con_cls == NULL)
{
if ((*con_cls = new( std::nothrow) Client(connection)) == NULL)
if ((*con_cls = new(std::nothrow) Client(connection)) == NULL)
{
return MHD_NO;
}
@ -335,7 +335,7 @@ static char* load_cert(const char* file)
struct stat st;
if (stat(file, &st) == 0
&& (rval = new( std::nothrow) char[st.st_size + 1]))
&& (rval = new(std::nothrow) char[st.st_size + 1]))
{
infile.read(rval, st.st_size);
rval[st.st_size] = '\0';

View File

@ -472,7 +472,7 @@ static bool duplicate_context_init(DUPLICATE_CONTEXT* context)
bool rv = false;
const int table_size = 10;
std::set<std::string>* sections = new( std::nothrow) std::set<std::string>;
std::set<std::string>* sections = new(std::nothrow) std::set<std::string>;
int errcode;
PCRE2_SIZE erroffset;
pcre2_code* re = pcre2_compile((PCRE2_SPTR) "^\\s*\\[(.+)\\]\\s*$",

View File

@ -3321,7 +3321,7 @@ static void poll_add_event_to_dcb(DCB* dcb, GWBUF* buf, uint32_t ev)
{
// ... otherwise we post the fake event using the messaging mechanism.
FakeEventTask* task = new( std::nothrow) FakeEventTask(dcb, buf, ev);
FakeEventTask* task = new(std::nothrow) FakeEventTask(dcb, buf, ev);
if (task)
{
@ -3530,7 +3530,7 @@ static bool dcb_add_to_worker(Worker* worker, DCB* dcb, uint32_t events)
// Otherwise we'll move the whole operation to the correct worker.
// This will only happen for "cli" and "maxinfo" services that must
// be served by one thread as there otherwise deadlocks can occur.
AddDcbToWorker* task = new( std::nothrow) AddDcbToWorker(dcb, events);
AddDcbToWorker* task = new(std::nothrow) AddDcbToWorker(dcb, events);
mxb_assert(task);
if (task)

View File

@ -90,7 +90,7 @@ SFilterDef filter_alloc(const char* name, const char* module, MXS_CONFIG_PARAMET
return NULL;
}
SFilterDef filter(new( std::nothrow) FilterDef(name, module, object, instance, params));
SFilterDef filter(new(std::nothrow) FilterDef(name, module, object, instance, params));
if (filter)
{

View File

@ -134,7 +134,7 @@ Housekeeper::Housekeeper()
bool Housekeeper::init()
{
hk = new( std::nothrow) Housekeeper;
hk = new(std::nothrow) Housekeeper;
return hk != nullptr;
}

View File

@ -2456,7 +2456,7 @@ bool monitor_set_disk_space_threshold(MXS_MONITOR* monitor, const char* disk_spa
{
if (!monitor->disk_space_threshold)
{
monitor->disk_space_threshold = new( std::nothrow) MxsDiskSpaceThreshold;
monitor->disk_space_threshold = new(std::nothrow) MxsDiskSpaceThreshold;
}
if (monitor->disk_space_threshold)
@ -2928,5 +2928,4 @@ void MonitorInstance::run_one_tick()
mon_hangup_failed_servers(m_monitor);
store_server_journal(m_monitor, m_master);
}
}

View File

@ -530,7 +530,7 @@ bool qc_thread_init(uint32_t kind)
if (kind & QC_INIT_SELF)
{
mxb_assert(!this_thread.pInfo_cache);
this_thread.pInfo_cache = new( std::nothrow) QCInfoCache;
this_thread.pInfo_cache = new(std::nothrow) QCInfoCache;
rc = true;
}
else

View File

@ -177,7 +177,7 @@ ResultSet::ResultSet(std::initializer_list<std::string> names)
std::unique_ptr<ResultSet> ResultSet::create(std::initializer_list<std::string> names)
{
return std::unique_ptr<ResultSet>(new( std::nothrow) ResultSet(names));
return std::unique_ptr<ResultSet>(new(std::nothrow) ResultSet(names));
}
void ResultSet::add_row(std::initializer_list<std::string> values)

View File

@ -187,7 +187,7 @@ bool RoutingWorker::init()
if (this_unit.epoll_listener_fd != -1)
{
int nWorkers = config_threadcount();
RoutingWorker** ppWorkers = new( std::nothrow) RoutingWorker* [MXS_MAX_THREADS](); // 0-inited
RoutingWorker** ppWorkers = new(std::nothrow) RoutingWorker* [MXS_MAX_THREADS](); // 0-inited
// array
if (ppWorkers)
@ -489,7 +489,7 @@ void RoutingWorker::post_run()
// static
RoutingWorker* RoutingWorker::create(int epoll_listener_fd)
{
RoutingWorker* pThis = new( std::nothrow) RoutingWorker();
RoutingWorker* pThis = new(std::nothrow) RoutingWorker();
if (pThis)
{

View File

@ -126,7 +126,7 @@ SERVER* server_alloc(const char* name, MXS_CONFIG_PARAMETER* params)
return NULL;
}
Server* server = new( std::nothrow) Server;
Server* server = new(std::nothrow) Server;
char* my_name = MXS_STRDUP(name);
char* my_protocol = MXS_STRDUP(protocol);
char* my_authenticator = MXS_STRDUP(authenticator);
@ -1519,7 +1519,7 @@ bool server_set_disk_space_threshold(SERVER* server, const char* disk_space_thre
{
if (!server->disk_space_threshold)
{
server->disk_space_threshold = new( std::nothrow) MxsDiskSpaceThreshold;
server->disk_space_threshold = new(std::nothrow) MxsDiskSpaceThreshold;
}
if (server->disk_space_threshold)

View File

@ -93,7 +93,7 @@ Service* service_alloc(const char* name, const char* router, MXS_CONFIG_PARAMETE
return NULL;
}
Service* service = new( std::nothrow) Service(name, router, params);
Service* service = new(std::nothrow) Service(name, router, params);
if (service == nullptr)
{

View File

@ -100,7 +100,7 @@ MXS_SESSION* session_alloc(SERVICE* service, DCB* client_dcb)
MXS_SESSION* session_alloc_with_id(SERVICE* service, DCB* client_dcb, uint64_t id)
{
Session* session = new( std::nothrow) Session;
Session* session = new(std::nothrow) Session;
if (session == nullptr)
{

View File

@ -248,7 +248,7 @@ private:
USERS* users_alloc()
{
Users* rval = new( std::nothrow) Users();
Users* rval = new(std::nothrow) Users();
MXS_OOM_IFNULL(rval);
return reinterpret_cast<USERS*>(rval);
}

View File

@ -1292,5 +1292,4 @@ size_t header_callback(char* ptr, size_t size, size_t nmemb, void* userdata)
return nmemb * size;
}
}
}

View File

@ -243,7 +243,7 @@ PamClientSession* PamClientSession::create(const PamInstance& inst)
MXS_ERROR("Failed to open SQLite3 handle.");
}
PamClientSession* rval = NULL;
if (!dbhandle || (rval = new( std::nothrow) PamClientSession(dbhandle, inst)) == NULL)
if (!dbhandle || (rval = new(std::nothrow) PamClientSession(dbhandle, inst)) == NULL)
{
sqlite3_close_v2(dbhandle);
}

View File

@ -67,7 +67,7 @@ PamInstance* PamInstance::create(char** options)
PamInstance* instance = NULL;
if (!error
&& ((instance = new( std::nothrow) PamInstance(dbhandle, pam_db_name, pam_table_name)) == NULL))
&& ((instance = new(std::nothrow) PamInstance(dbhandle, pam_db_name, pam_table_name)) == NULL))
{
sqlite3_close_v2(dbhandle);
}

View File

@ -21,7 +21,7 @@
static void* pam_backend_auth_alloc(void* instance)
{
PamBackendSession* pses = new( std::nothrow) PamBackendSession();
PamBackendSession* pses = new(std::nothrow) PamBackendSession();
return pses;
}

View File

@ -265,7 +265,7 @@ CacheFilterSession* CacheFilterSession::Create(Cache* pCache, MXS_SESSION* pSess
if ((zDb[0] == 0) || zDefaultDb)
{
pCacheFilterSession = new( std::nothrow) CacheFilterSession(pSession, pCache, zDefaultDb);
pCacheFilterSession = new(std::nothrow) CacheFilterSession(pSession, pCache, zDefaultDb);
if (!pCacheFilterSession)
{

View File

@ -558,7 +558,7 @@ cache_result_t LRUStorage::get_new_node(const CACHE_KEY& key,
}
else
{
pNode = new( std::nothrow) Node;
pNode = new(std::nothrow) Node;
}
if (pNode)

View File

@ -435,7 +435,7 @@ std::auto_ptr<CacheRules> CacheRules::create(uint32_t debug)
if (pRules)
{
sThis = std::auto_ptr<CacheRules>(new( std::nothrow) CacheRules(pRules));
sThis = std::auto_ptr<CacheRules>(new(std::nothrow) CacheRules(pRules));
}
return sThis;

View File

@ -487,7 +487,7 @@ static int dbfw_thr_init()
mxb_assert(this_thread == NULL);
int rval = 0;
if ((this_thread = new( std::nothrow) DbfwThread) == NULL)
if ((this_thread = new(std::nothrow) DbfwThread) == NULL)
{
MXS_OOM();
rval = -1;
@ -1227,7 +1227,7 @@ Dbfw* Dbfw::create(const char* zName, MXS_CONFIG_PARAMETER* pParams)
if (process_rule_file(file, &rules, &users))
{
rval = new( std::nothrow) Dbfw(pParams);
rval = new(std::nothrow) Dbfw(pParams);
}
return rval;
@ -1235,7 +1235,7 @@ Dbfw* Dbfw::create(const char* zName, MXS_CONFIG_PARAMETER* pParams)
DbfwSession* Dbfw::newSession(MXS_SESSION* session)
{
return new( std::nothrow) DbfwSession(this, session);
return new(std::nothrow) DbfwSession(this, session);
}
fw_actions Dbfw::get_action() const

View File

@ -249,7 +249,7 @@ void expose_functions(lua_State* state, GWBUF** active_buffer)
*/
static MXS_FILTER* createInstance(const char* name, MXS_CONFIG_PARAMETER* params)
{
LUA_INSTANCE* my_instance = new( std::nothrow) LUA_INSTANCE;
LUA_INSTANCE* my_instance = new(std::nothrow) LUA_INSTANCE;
if (my_instance == NULL)
{

View File

@ -480,7 +480,7 @@ static MXS_FILTER* createInstance(const char* name, MXS_CONFIG_PARAMETER* params
{
// The instance is allocated before opening the file since open_log_file() takes the instance as a
// parameter. Will be fixed (or at least cleaned) with a later refactoring of functions/methods.
my_instance = new( std::nothrow) QlaInstance(name, params);
my_instance = new(std::nothrow) QlaInstance(name, params);
if (my_instance)
{
my_instance->re_match = re_match;
@ -592,14 +592,14 @@ static MXS_FILTER_SESSION* newSession(MXS_FILTER* instance, MXS_SESSION* session
QlaFilterSession* my_session = NULL;
if (!error)
{
my_session = new( std::nothrow) QlaFilterSession(userName,
remote,
ses_active,
mdata,
filename,
session_file,
session->ses_id,
session->service->name);
my_session = new(std::nothrow) QlaFilterSession(userName,
remote,
ses_active,
mdata,
filename,
session_file,
session->ses_id,
session->service->name);
if (my_session == NULL)
{
error = true;

View File

@ -74,13 +74,13 @@ Tee* Tee::create(const char* name, MXS_CONFIG_PARAMETER* params)
const char* match_str = config_get_string(params, "match");
const char* exclude_str = config_get_string(params, "exclude");
Tee* my_instance = new( std::nothrow) Tee(service,
source,
user,
match,
match_str,
exclude,
exclude_str);
Tee* my_instance = new(std::nothrow) Tee(service,
source,
user,
match,
match_str,
exclude,
exclude_str);
if (my_instance == NULL)
{

View File

@ -67,7 +67,7 @@ TeeSession* TeeSession::create(Tee* my_instance, MXS_SESSION* session)
}
}
TeeSession* tee = new( std::nothrow) TeeSession(session, client, match, md_match, exclude, md_exclude);
TeeSession* tee = new(std::nothrow) TeeSession(session, client, match, md_match, exclude, md_exclude);
if (!tee)
{

View File

@ -849,8 +849,8 @@ bool MariaDBMonitor::failover_perform(ClusterOperation& op)
* once so that latest status is printed. */
wait_cluster_stabilization(op, redirected_slaves);
MXS_INFO("Failover: slave replication confirmation took %.1f seconds with "
"%.1f seconds to spare.",
timer.lap().secs(), op.time_remaining.secs());
"%.1f seconds to spare.",
timer.lap().secs(), op.time_remaining.secs());
}
}
return rval;

View File

@ -265,17 +265,17 @@ private:
const MariaDBServer* demotion_target,
uint32_t gtid_domain,
std::string* reason_out = NULL);
int redirect_slaves(MariaDBServer* new_master,
const ServerArray& slaves,
ServerArray* redirected_slaves);
int redirect_slaves(MariaDBServer* new_master,
const ServerArray& slaves,
ServerArray* redirected_slaves);
int redirect_slaves_ex(ClusterOperation& op, const ServerArray& slaves,
ServerArray* redirected_slaves);
std::string generate_change_master_cmd(const std::string& master_host, int master_port);
bool start_external_replication(MariaDBServer* new_master, json_t** err_out);
void wait_cluster_stabilization(ClusterOperation& op, const ServerArray& slaves);
void report_and_disable(const std::string& operation,
const std::string& setting_name,
bool* setting_var);
void wait_cluster_stabilization(ClusterOperation& op, const ServerArray& slaves);
void report_and_disable(const std::string& operation,
const std::string& setting_name,
bool* setting_var);
bool check_gtid_replication(Log log_mode,
const MariaDBServer* demotion_target,
json_t** error_out);

View File

@ -50,4 +50,5 @@ ClusterOperation::ClusterOperation(OperationType type,
, replication_password(replication_password)
, error_out(error)
, time_remaining(time_remaining)
{}
{
}

View File

@ -237,7 +237,7 @@ LocalClient* LocalClient::create(MYSQL_session* session, MySQLProtocol* proto, c
if (fd > 0 && (connect(fd, (struct sockaddr*)&addr, sizeof(addr)) == 0 || errno == EINPROGRESS))
{
LocalClient* relay = new( std::nothrow) LocalClient(session, proto, fd);
LocalClient* relay = new(std::nothrow) LocalClient(session, proto, fd);
if (relay)
{

View File

@ -125,7 +125,7 @@ Avro* Avro::create(SERVICE* service, SRowEventHandler handler)
}
}
return new( std::nothrow) Avro(service, service->svc_config_param, source_service, handler);
return new(std::nothrow) Avro(service, service->svc_config_param, source_service, handler);
}
Avro::Avro(SERVICE* service, MXS_CONFIG_PARAMETER* params, SERVICE* source, SRowEventHandler handler)

View File

@ -740,7 +740,7 @@ void AvroSession::client_callback()
// static
AvroSession* AvroSession::create(Avro* inst, MXS_SESSION* session)
{
return new( std::nothrow) AvroSession(inst, session);
return new(std::nothrow) AvroSession(inst, session);
}
AvroSession::AvroSession(Avro* instance, MXS_SESSION* session)

View File

@ -74,7 +74,7 @@ AvroTable* avro_table_alloc(const char* filepath,
return NULL;
}
AvroTable* table = new( std::nothrow) AvroTable(avro_file, avro_writer_iface, avro_schema);
AvroTable* table = new(std::nothrow) AvroTable(avro_file, avro_writer_iface, avro_schema);
if (!table)
{

View File

@ -341,7 +341,7 @@ static bool conversion_task_ctl(Avro* inst, bool start)
if (!maxscale_is_shutting_down())
{
Worker* worker = static_cast<Worker*>(mxs_rworker_get(MXS_RWORKER_MAIN));
std::unique_ptr<ConversionCtlTask> task(new( std::nothrow) ConversionCtlTask(inst, start));
std::unique_ptr<ConversionCtlTask> task(new(std::nothrow) ConversionCtlTask(inst, start));
if (task.get())
{

View File

@ -147,7 +147,7 @@ TableCreateEvent* table_create_from_schema(const char* file,
if (json_extract_field_names(file, columns))
{
newtable = new( std::nothrow) TableCreateEvent(db, table, version, std::move(columns));
newtable = new(std::nothrow) TableCreateEvent(db, table, version, std::move(columns));
}
return newtable;

View File

@ -541,7 +541,7 @@ STableCreateEvent table_create_alloc(char* ident, const char* sql, int len)
if (!columns.empty())
{
int version = resolve_table_version(database, table);
rval.reset(new( std::nothrow) TableCreateEvent(database, table, version, std::move(columns)));
rval.reset(new(std::nothrow) TableCreateEvent(database, table, version, std::move(columns)));
}
else
{
@ -600,13 +600,13 @@ TableMapEvent* table_map_alloc(uint8_t* ptr, uint8_t hdr_len, TableCreateEvent*
Bytes cols(column_types, column_types + column_count);
Bytes nulls(nullmap, nullmap + nullmap_size);
Bytes meta(metadata, metadata + metadata_size);
return new( std::nothrow) TableMapEvent(schema_name,
table_name,
table_id,
create->version,
std::move(cols),
std::move(nulls),
std::move(meta));
return new(std::nothrow) TableMapEvent(schema_name,
table_name,
table_id,
create->version,
std::move(cols),
std::move(nulls),
std::move(meta));
}
Rpl::Rpl(SERVICE* service,
@ -864,7 +864,7 @@ STableCreateEvent Rpl::table_create_copy(const char* sql, size_t len, const char
if (it != m_created_tables.end())
{
rval.reset(new( std::nothrow) TableCreateEvent(*it->second));
rval.reset(new(std::nothrow) TableCreateEvent(*it->second));
char* table = strchr(target, '.');
table = table ? table + 1 : target;
rval->table = table;

View File

@ -250,7 +250,7 @@ RWSplit* RWSplit::create(SERVICE* service, MXS_CONFIG_PARAMETER* params)
config.master_reconnection = true;
}
return new( std::nothrow) RWSplit(service, config);
return new(std::nothrow) RWSplit(service, config);
}
RWSplitSession* RWSplit::newSession(MXS_SESSION* session)

View File

@ -532,11 +532,11 @@ sp_between_new_paren = remove # ignore/add/remove/force
sp_after_newop_paren = force # ignore/add/remove/force
# Controls the spaces inside paren of the new operator: 'new(foo) BAR'.
sp_inside_newop_paren = ignore # ignore/add/remove/force
sp_inside_newop_paren = remove # ignore/add/remove/force
# Controls the space after open paren of the new operator: 'new(foo) BAR'.
# Overrides sp_inside_newop_paren.
sp_inside_newop_paren_open = force # ignore/add/remove/force
sp_inside_newop_paren_open = ignore # ignore/add/remove/force
# Controls the space before close paren of the new operator: 'new(foo) BAR'.
# Overrides sp_inside_newop_paren.