diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-11-03 11:47:44 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-11-03 11:47:44 +0000 |
commit | f3b6e0c757d8813a1b4e5c78a4fa7ab3bdef9606 (patch) | |
tree | 70a100bb7f69a43a9dbdc8e21c798899adc0810a /vespalib | |
parent | 96f6abe9caa338074ee39cb2fd566d3efff464c9 (diff) |
No need to specify your own namespace.
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/vespa/vespalib/data/memory.cpp | 5 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/datastore/datastorebase.cpp | 6 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/portal/portal.cpp | 2 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/util/rusage.cpp | 4 |
4 files changed, 9 insertions, 8 deletions
diff --git a/vespalib/src/vespa/vespalib/data/memory.cpp b/vespalib/src/vespa/vespalib/data/memory.cpp index f20e3a27f73..fe9d3e97638 100644 --- a/vespalib/src/vespa/vespalib/data/memory.cpp +++ b/vespalib/src/vespa/vespalib/data/memory.cpp @@ -11,7 +11,8 @@ Memory::make_string() const return vespalib::string(data, size); } -std::ostream &operator<<(std::ostream &os, const Memory &memory) { +std::ostream & +operator<<(std::ostream &os, const Memory &memory) { uint32_t written = 0; uint32_t hexCount = 25; os << "size: " << memory.size << "(bytes)" << std::endl; @@ -20,7 +21,7 @@ std::ostream &operator<<(std::ostream &os, const Memory &memory) { os << std::endl; written = 0; } - os << vespalib::make_string("0x%02x ", memory.data[i] & 0xff); + os << make_string("0x%02x ", memory.data[i] & 0xff); } if (written > 0) { os << std::endl; diff --git a/vespalib/src/vespa/vespalib/datastore/datastorebase.cpp b/vespalib/src/vespa/vespalib/datastore/datastorebase.cpp index af320136815..c15d4784cc9 100644 --- a/vespalib/src/vespa/vespalib/datastore/datastorebase.cpp +++ b/vespalib/src/vespa/vespalib/datastore/datastorebase.cpp @@ -110,8 +110,8 @@ DataStoreBase::switch_primary_buffer(uint32_t typeId, size_t entries_needed) { size_t buffer_id = getFirstFreeBufferId(); if (buffer_id >= getMaxNumBuffers()) { - LOG_ABORT(vespalib::make_string("switch_primary_buffer(%u, %zu): did not find a free buffer", - typeId, entries_needed).c_str()); + LOG_ABORT(make_string("switch_primary_buffer(%u, %zu): did not find a free buffer", + typeId, entries_needed).c_str()); } on_active(buffer_id, typeId, entries_needed); _primary_buffer_ids[typeId] = buffer_id; @@ -402,7 +402,7 @@ DataStoreBase::on_active(uint32_t bufferId, uint32_t typeId, size_t entries_need BufferAndMeta & bufferMeta = _buffers[bufferId]; BufferState *state = bufferMeta.get_state_relaxed(); if (state == nullptr) { - BufferState & newState = _stash.create<BufferState>(); + auto & newState = _stash.create<BufferState>(); if (_disable_entry_hold_list) { newState.disable_entry_hold_list(); } diff --git a/vespalib/src/vespa/vespalib/portal/portal.cpp b/vespalib/src/vespa/vespalib/portal/portal.cpp index 9d9a9dc1557..8e91e2b5caf 100644 --- a/vespalib/src/vespa/vespalib/portal/portal.cpp +++ b/vespalib/src/vespa/vespalib/portal/portal.cpp @@ -200,7 +200,7 @@ Portal::Portal(CryptoEngine::SP crypto, int port) handle_accept(std::move(guard), std::move(socket)); } }); - _my_host = vespalib::make_string("%s:%d", HostName::get().c_str(), listen_port()); + _my_host = make_string("%s:%d", HostName::get().c_str(), listen_port()); } Portal::~Portal() diff --git a/vespalib/src/vespa/vespalib/util/rusage.cpp b/vespalib/src/vespa/vespalib/util/rusage.cpp index f582dddad97..b0245a4e814 100644 --- a/vespalib/src/vespa/vespalib/util/rusage.cpp +++ b/vespalib/src/vespa/vespalib/util/rusage.cpp @@ -48,7 +48,7 @@ RUsage::createSelf(vespalib::steady_time since) RUsage r; r._time = vespalib::steady_clock::now() - since; if (getrusage(RUSAGE_SELF, &r) != 0) { - throw std::runtime_error(vespalib::make_string("getrusage failed with errno = %d", errno).c_str()); + throw std::runtime_error(make_string("getrusage failed with errno = %d", errno).c_str()); } return r; } @@ -59,7 +59,7 @@ RUsage::createChildren(vespalib::steady_time since) RUsage r; r._time = vespalib::steady_clock::now() - since; if (getrusage(RUSAGE_CHILDREN, &r) != 0) { - throw std::runtime_error(vespalib::make_string("getrusage failed with errno = %d", errno).c_str()); + throw std::runtime_error(make_string("getrusage failed with errno = %d", errno).c_str()); } return r; } |