mirror of
https://github.com/XLabsProject/s1x-client.git
synced 2023-08-02 15:02:12 +02:00
Remove unnecessary const_cast
This commit is contained in:
parent
d11d97932b
commit
81a8200d22
@ -346,8 +346,6 @@ links {"common"}
|
||||
|
||||
resincludedirs {"$(ProjectDir)src"}
|
||||
|
||||
links {"common"}
|
||||
|
||||
dependencies.imports()
|
||||
|
||||
group "Dependencies"
|
||||
|
@ -36,7 +36,7 @@ namespace utils
|
||||
buffer = buffer.substr(1);
|
||||
}
|
||||
|
||||
auto key_values = string::split(buffer, '\\');
|
||||
const auto key_values = string::split(buffer, '\\');
|
||||
for (size_t i = 0; !key_values.empty() && i < (key_values.size() - 1); i += 2)
|
||||
{
|
||||
const auto& key = key_values[i];
|
||||
|
@ -9,8 +9,8 @@ namespace utils
|
||||
{
|
||||
public:
|
||||
info_string() = default;
|
||||
info_string(const std::string& buffer);
|
||||
info_string(const std::string_view& buffer);
|
||||
explicit info_string(const std::string& buffer);
|
||||
explicit info_string(const std::string_view& buffer);
|
||||
|
||||
void set(const std::string& key, const std::string& value);
|
||||
std::string get(const std::string& key) const;
|
||||
|
@ -64,7 +64,7 @@ namespace utils::io
|
||||
if (size > -1)
|
||||
{
|
||||
data->resize(static_cast<uint32_t>(size));
|
||||
stream.read(const_cast<char*>(data->data()), size);
|
||||
stream.read(data->data(), size);
|
||||
stream.close();
|
||||
return true;
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ namespace utils
|
||||
{
|
||||
std::lock_guard _(this->mutex_);
|
||||
|
||||
for (auto& data : this->pool_)
|
||||
for (const auto& data : this->pool_)
|
||||
{
|
||||
memory::free(data);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user