build: Benign changes to remove errors in clang 15

This commit is contained in:
John Colvin committed 2022-10-05 11:03:13 -04:00
1 parent e00eae1129
commit 1beb9460ba
15 files changed
+22 -28

No files matched your search

+1 -1
View File
@@ -186,7 +186,7 @@ CAPI void api_client_send(
void *extra) {
LOG(Api, Diag, "send rpc {}", ((int64_t)buffer));
std::string strbuf(buffer, buffer_length);
qbus::RPCRequest request(move(strbuf));
qbus::RPCRequest request(std::move(strbuf));
api_client_send_internal(
pclient, std::move(request), cb, rpc_connect_timeout_ms(), extra);
}
+1 -1
View File
@@ -60,7 +60,7 @@ CAPI void api_server_call_callback(
reinterpret_cast<qbus::ReplyHandler **>(ppvhandler);
std::string reply_buffer((const char *)buffer, (size_t)length);
qbus::RPCReplyPtr replyptr =
std::make_shared<qbus::RPCReply>(move(reply_buffer));
std::make_shared<qbus::RPCReply>(std::move(reply_buffer));
(**pphandler)(replyptr);
delete (*pphandler);
*pphandler = nullptr;
+1 -1
View File
@@ -72,7 +72,7 @@ class ClientChannel {
response_buffer + header_size,
response_size - header_size);
if (response->ParseFromZeroCopyStream(&data_stream)) {
on_response(Result<Response>(move(response)));
on_response(Result<Response>(std::move(response)));
return;
}
} else {
+1 -1
View File
@@ -28,7 +28,7 @@ void QuickbusClientChannel::send_core(
(*on_response)(buffer, length);
delete on_response;
};
OnReply *heap_on_response = new OnReply(move(on_response));
OnReply *heap_on_response = new OnReply(std::move(on_response));
api_client_send(
_pclient, request_envalope.c_str(), request_envalope.size(), trampoline,
heap_on_response);
@@ -11,8 +11,8 @@ using namespace rxcpp::operators;
{{#each service}}
// Constructor
{{name}}::{{name}}(std::unique_ptr<bts::api::ClientChannel> pchannel) : _pchannel(move(pchannel)) {}
{{name}}::{{name}}({{name}}&& other) : _pchannel(move(other._pchannel)) { }
{{name}}::{{name}}(std::unique_ptr<bts::api::ClientChannel> pchannel) : _pchannel(std::move(pchannel)) {}
{{name}}::{{name}}({{name}}&& other) : _pchannel(std::move(other._pchannel)) { }
{{#each method}}
{{#if server_streaming}}
+1 -1
View File
@@ -783,7 +783,7 @@ class MDConsumerImpl {
// recurse to find details
map<security_key, SecurityPtr> leg_map;
for (auto &leg : fill_leg_details(legs, depth + 1)) {
leg_map.insert(make_pair(leg->id(), move(leg)));
leg_map.insert(make_pair(leg->id(), std::move(leg)));
}
//
+1 -1
View File
@@ -173,7 +173,7 @@ MDProducerImpl &MDProducer::get_producer(
} else {
newp.reset(new MDProducerImpl(symbol, type, exchange, _platform, _flags));
}
_producers.push_back(move(newp));
_producers.push_back(std::move(newp));
return *_producers.back();
}
+4 -6
View File
@@ -210,7 +210,6 @@ void SecurityIDRecorderState::work_handles() {
Security security;
MDProducerHandle handle;
vector<MDProducerHandle> retry;
int count = 0;
while (pending_handle.try_pop(handle)) {
security.Clear();
// if a spread does not have all of its legs we need to wait
@@ -220,7 +219,6 @@ void SecurityIDRecorderState::work_handles() {
retry.push_back(handle);
} else {
convert_security(handle.security(), &security);
++count;
assign_key(security, [handle](const api::Security &security) mutable {
handle.set_key(security.id());
});
@@ -254,7 +252,7 @@ void SecurityIDRecorderState::work_db() {
// If we're unable to create a descriptor try again later
if (descriptor == "") {
defer.push_back(move(temp));
defer.push_back(std::move(temp));
continue;
}
@@ -262,10 +260,10 @@ void SecurityIDRecorderState::work_db() {
if (key != invalid_security_key) {
temp->security.set_id(key);
temp->callback(temp->security);
existing_securities.push_back(move(temp));
existing_securities.push_back(std::move(temp));
} else {
// always push in parallel
new_entries.push_back(move(temp));
new_entries.push_back(std::move(temp));
new_descriptors.push_back(descriptor);
++count;
// Limit the amount of time we spend writing to sqlite during startup
@@ -279,7 +277,7 @@ void SecurityIDRecorderState::work_db() {
for (auto &d : defer) {
LOG(md, Info, "SecurityIDRecorderState::work_db work.push d: {}",
bts::securities::descriptor(d->security));
work.push(move(d));
work.push(std::move(d));
}
if (!new_entries.empty()) {
+1 -1
View File
@@ -1238,7 +1238,7 @@ struct Co2IndexTests {
temp->security.mutable_glbx()->set_exchange_id(id);
temp->exchange_id = id;
temp->handle.key(count);
index.add_security(id, move(temp));
index.add_security(id, std::move(temp));
}
}
@@ -31,13 +31,12 @@ void BookUtils::change_unit_qty(
const BookSide& book_in, std::vector<md::PriceSize>& book_out, int unit_qty) {
//
bts_assert(unit_qty > 0);
int mlev = 0, mlev_qty_used = 0;
int mlev_qty_used = 0;
std::vector<md::PriceSize> unit_lev_span;
for (uint32_t i = 0; i < book_in.size();) {
int mlev_qty_rem = book_in[i].size() - mlev_qty_used;
if (mlev_qty_rem == 0) {
mlev_qty_used = 0;
mlev++;
i++;
continue;
}
@@ -49,7 +48,6 @@ void BookUtils::change_unit_qty(
} else {
unit_lev_span.emplace_back(book_in[i].int_price(), mlev_qty_rem);
mlev_qty_used = 0;
mlev++;
i++;
}
} else {
+2 -2
View File
@@ -74,14 +74,14 @@ struct BoostLowLevelSharedMemoryImpl {
void add_region(shared_memory_object block) {
mapped_region region(block, block.get_mode());
_mappings.push_back(make_pair(move(block), move(region)));
_mappings.push_back(make_pair(std::move(block), std::move(region)));
}
Segment create(const string &name, size_t size) {
try {
shared_memory_object block(create_only, name.c_str(), read_write);
block.truncate(size);
add_region(move(block));
add_region(std::move(block));
return make_segment(size, _mappings.back().second.get_address());
} catch (...) {
return make_segment(0, nullptr);
@@ -395,9 +395,7 @@ void test_synth_book(LegMarkets synth) {
// test every permutation of the legs. All permutations of a particular
// set of legs should produce the same synthetic book.
auto perms = bts::spartan::Permutation::all(synth);
int counter = 0;
for (const auto &p : perms) {
counter++;
SmallBook book_out;
SmallBook book_out_historic;
bts::spartan::mdp3::book_utils::compute_synthetic_book(book_out_historic, p, 10);
+3 -3
View File
@@ -114,7 +114,7 @@ struct ApiGatewayImpl {
api_header.AppendToString(&buffer);
buffer += body;
// call send
Responder *presponder = new Responder(move(reply));
Responder *presponder = new Responder(std::move(reply));
api_client_send(
pclient, buffer.c_str(), buffer.size(),
[](const char *buffer, size_t length, void *extra) {
@@ -144,10 +144,10 @@ struct ApiGatewayImpl {
// call api_client_subscribe() store the TableSubscription and the id and
// the reply channel When a tableupate fires attach the id to the reply
// and send it over the channel Responder* preply = new
// Responder(move(reply));
// Responder(std::move(reply));
auto id = request.request_id();
SubscriptionContext *pcontext =
new SubscriptionContext{id, move(reply), nullptr};
new SubscriptionContext{id, std::move(reply), nullptr};
auto table = api_client_subscribe(
pclient, request.method_name().c_str(),
@@ -104,7 +104,7 @@ void ICEMain::start(std::vector<UserSymbol> &symbols) {
unique_ptr<onixs_ice::Handler> phandler =
prepare_handler(channel, license.path.string());
_listeners.push_back(prepare_listener(*phandler, channel));
_handlers.push_back(std::make_pair(channel, move(phandler)));
_handlers.push_back(std::make_pair(channel, std::move(phandler)));
std::stringstream symstr;
for (const auto &sym : channel.symbols)
@@ -122,7 +122,7 @@ create_feed_engines(const vector<CMEChannel> &channels) {
// Loop through settings and instantiate feed engines
for (const auto &s : settings) {
unique_ptr<onixs::FeedEngine> temp(new onixs::FeedEngine(s.second));
result.insert(make_pair(s.first, move(temp)));
result.insert(make_pair(s.first, std::move(temp)));
}
return result;
@@ -168,7 +168,7 @@ void MDP3Main::start(
for (const auto &channel : channels) {
unique_ptr<onixs::Handler> phandler = prepare_handler(channel.id, mbo);
_listeners.push_back(prepare_listener(*phandler, channel, mbo, tssd));
_handlers.insert(std::make_pair(channel.id, move(phandler)));
_handlers.insert(std::make_pair(channel.id, std::move(phandler)));
std::stringstream symstr;
for (const auto &sym : channel.symbols) {
symstr << sym.symbol() << "-" << SecurityType_Name(sym.type()) << " ";