Files
scylladb/gms/versioned_value.cc
Gleb Natapov 1586fa65af gms: remove unused code
Also moved version_string(...) and make_token_string(...) to private: — they are internal helpers used only by normal(), not part of the public API
2026-04-09 13:31:40 +03:00

29 lines
747 B
C++

/*
*
* Modified by ScyllaDB
* Copyright (C) 2015-present ScyllaDB
*/
/*
* SPDX-License-Identifier: (LicenseRef-ScyllaDB-Source-Available-1.0 and Apache-2.0)
*/
#include "gms/versioned_value.hh"
#include "message/messaging_service.hh"
namespace gms {
static_assert(std::is_nothrow_default_constructible_v<versioned_value>);
static_assert(std::is_nothrow_move_constructible_v<versioned_value>);
versioned_value versioned_value::network_version() {
return versioned_value(format("{}", netw::messaging_service::current_version));
}
sstring versioned_value::make_token_string(const std::unordered_set<dht::token>& tokens) {
if (tokens.empty()) {
return "";
}
return tokens.begin()->to_sstring();
}
} // namespace gms