vcpkg/ports/arcus/0001-fix-protobuf-deprecate...

39 lines
1.7 KiB
Diff

diff --git a/src/MessageTypeStore.cpp b/src/MessageTypeStore.cpp
index 382a138..65c10e8 100644
--- a/src/MessageTypeStore.cpp
+++ b/src/MessageTypeStore.cpp
@@ -34,9 +34,9 @@ using namespace Arcus;
* of std::hash differs between compilers, we need to make sure we use the same
* implementation everywhere.
*/
-uint32_t hash(const std::string& input)
+uint32_t hash(const absl::string_view& input)
{
- const char* data = input.c_str();
+ const char* data = input.data();
uint32_t length = input.size();
uint32_t result = static_cast<uint32_t>(2166136261UL);
for(; length; --length)
@@ -52,7 +52,7 @@ class ErrorCollector : public google::protobuf::compiler::MultiFileErrorCollecto
public:
ErrorCollector() : _error_count(0) { }
- void AddError(const std::string& filename, int line, int column, const std::string& message) override
+ void RecordError(absl::string_view filename, int line, int column, absl::string_view message) override
{
_stream << "[" << filename << " (" << line << "," << column << ")] " << message << std::endl;
_error_count++;
diff --git a/src/Socket_p.h b/src/Socket_p.h
index 9c3c084..9ccabda 100644
--- a/src/Socket_p.h
+++ b/src/Socket_p.h
@@ -548,7 +548,7 @@ namespace Arcus
google::protobuf::io::ArrayInputStream array(wire_message->data, wire_message->size);
google::protobuf::io::CodedInputStream stream(&array);
- stream.SetTotalBytesLimit(message_size_maximum, message_size_warning);
+ stream.SetTotalBytesLimit(message_size_maximum);
if(!message->ParseFromCodedStream(&stream))
{
error(ErrorCode::ParseFailedError, "Failed to parse message:" + std::string(wire_message->data));