Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Commit 30e6ab8

Browse files
committed
const&
1 parent d88b84c commit 30e6ab8

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

src/influxdb-cpp-rest/deflate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ using namespace web::http::compression::builtin;
1313

1414
namespace influxdb {
1515
namespace utility {
16-
int compress(std::shared_ptr<fmt::MemoryWriter> w, std::vector<uint8_t> &compression_buffer) {
16+
int compress(std::shared_ptr<fmt::MemoryWriter> const& w, std::vector<uint8_t> &compression_buffer) {
1717
auto c = make_compressor(algorithm::GZIP);
1818
const int rawdata_size = w->size();
1919
const uint8_t* rawdata_ptr =

src/influxdb-cpp-rest/deflate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace influxdb {
77
namespace utility {
8-
int compress(std::shared_ptr<fmt::MemoryWriter> w, std::vector<uint8_t> &compression_buffer);
8+
int compress(std::shared_ptr<fmt::MemoryWriter> const &w, std::vector<uint8_t> &compression_buffer);
99
}
1010
}
1111

src/influxdb-cpp-rest/influxdb_raw_db.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ string_t influxdb::raw::db::get(string_t const & query)
125125
}
126126
}
127127

128-
void influxdb::raw::db::insert(std::shared_ptr<fmt::MemoryWriter> lines)
128+
void influxdb::raw::db::insert(std::shared_ptr<fmt::MemoryWriter> const& lines)
129129
{
130130
auto request = request_from(uri_with_db, username, password, deflate, retention_policy);
131131
std::vector<uint8_t> buffer; // needs to live until sending the request
@@ -150,7 +150,7 @@ void influxdb::raw::db::insert(std::shared_ptr<fmt::MemoryWriter> lines)
150150
}
151151

152152
// synchronous for now
153-
void influxdb::raw::db::insert_async(std::shared_ptr<fmt::MemoryWriter> lines)
153+
void influxdb::raw::db::insert_async(std::shared_ptr<fmt::MemoryWriter> const& lines)
154154
{
155155
insert(lines);
156156
}

src/influxdb-cpp-rest/influxdb_raw_db.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ namespace influxdb {
3434
string_t get(string_t const& query);
3535

3636
/// post measurements
37-
void insert(std::shared_ptr<fmt::MemoryWriter> lines);
37+
void insert(std::shared_ptr<fmt::MemoryWriter> const& lines);
3838

3939
/// post measurements and do not wait
40-
void insert_async(std::shared_ptr<fmt::MemoryWriter> lines);
40+
void insert_async(std::shared_ptr<fmt::MemoryWriter> const& lines);
4141

4242
/// set username & password for basic authentication
4343
void with_authentication(std::string const& username, std::string const& password);

src/influxdb-cpp-rest/influxdb_raw_db_utf8.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ std::string influxdb::raw::db_utf8::get(std::string const& query) {
5656
#endif
5757
}
5858

59-
void influxdb::raw::db_utf8::insert(std::shared_ptr<fmt::MemoryWriter> lines) {
59+
void influxdb::raw::db_utf8::insert(std::shared_ptr<fmt::MemoryWriter> const& lines) {
6060
pimpl->db_utf16.insert(lines);
6161
}
6262

63-
void influxdb::raw::db_utf8::insert_async(std::shared_ptr<fmt::MemoryWriter> lines)
63+
void influxdb::raw::db_utf8::insert_async(std::shared_ptr<fmt::MemoryWriter> const& lines)
6464
{
6565
pimpl->db_utf16.insert_async(lines);
6666
}

src/influxdb-cpp-rest/influxdb_raw_db_utf8.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ namespace influxdb {
2626
std::string get(std::string const& query);
2727

2828
/// post measurements
29-
void insert(std::shared_ptr<fmt::MemoryWriter> lines);
29+
void insert(std::shared_ptr<fmt::MemoryWriter> const& lines);
3030

3131
/// post measurements without waiting for an answer
32-
void insert_async(std::shared_ptr<fmt::MemoryWriter> lines);
32+
void insert_async(std::shared_ptr<fmt::MemoryWriter> const& lines);
3333

3434
/// set username & password for basic authentication
3535
void with_authentication(std::string const& username, std::string const& password);

0 commit comments

Comments
 (0)