KalleOlaviNiemitalo commented on code in PR #3284:
URL: https://github.com/apache/avro/pull/3284#discussion_r1905577124


##########
lang/c++/impl/Compiler.cc:
##########
@@ -136,7 +136,11 @@ int64_t getLongField(const Entity &e, const Object &m,
 // Unescape double quotes (") for de-serialization.  This method complements 
the
 // method NodeImpl::escape() which is used for serialization.
 static void unescape(string &s) {
-    boost::replace_all(s, "\\\"", "\"");
+    std::string::size_type pos = 0;
+    while ((pos = s.find("\\\"", pos)) != std::string::npos) {
+        s.replace(pos, 2, "\"");
+        pos += 2;
+    }

Review Comment:
   Yes, 35a9b5a1a3a0f0a7589c2ef63f71e899ce1c01a9 looks all right in that 
respect.
   
   It is somewhat strange that the `unescape` function translates `\"` to `"` 
but does nothing to `\\`.  However, this pull request does not change that 
behavior, and it is not related to whether Boost is used.  So if it needs 
fixing, I guess it's better to do that under a separate issue.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to