summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-11-03 11:47:44 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2023-11-04 14:30:17 +0000
commit7afa9dde3c0b86d1b4ded4b4bc583189ba45a17d (patch)
treea5ac68dbadd2712f99a5ca97bbab6d7fa0527569 /vespalib
parent36ea77e0489ef327b4e5af42a2bb43275a7c1de8 (diff)
No need to specify your own namespace.
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/data/memory.cpp5
-rw-r--r--vespalib/src/vespa/vespalib/datastore/datastorebase.cpp6
-rw-r--r--vespalib/src/vespa/vespalib/portal/portal.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/util/rusage.cpp4
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;
}