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
47 changed files with 109 additions and 110 deletions

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)