THRIFT-5817: [C++] Avoid copy of TUuid
Client: cpp
Patch: Carel Combrink
This closes #3038
diff --git a/lib/c_glib/test/testthrifttestclient.cpp b/lib/c_glib/test/testthrifttestclient.cpp
index 513f071..745feb7 100644
--- a/lib/c_glib/test/testthrifttestclient.cpp
+++ b/lib/c_glib/test/testthrifttestclient.cpp
@@ -112,9 +112,9 @@
out = thing;
}
- apache::thrift::TUuid testUuid(const apache::thrift::TUuid thing) override {
+ void testUuid(apache::thrift::TUuid& out, const apache::thrift::TUuid& thing) override {
cout << "[C -> C++] testUuid(\"" << thing << "\")" << '\n';
- return thing;
+ out = thing;
}
void testStruct(Xtruct& out, const Xtruct &thing) override {
diff --git a/lib/c_glib/test/testthrifttestzlibclient.cpp b/lib/c_glib/test/testthrifttestzlibclient.cpp
index dbcd64e..783d065 100644
--- a/lib/c_glib/test/testthrifttestzlibclient.cpp
+++ b/lib/c_glib/test/testthrifttestzlibclient.cpp
@@ -107,9 +107,9 @@
out = thing;
}
- apache::thrift::TUuid testUuid(const apache::thrift::TUuid thing) override {
+ void testUuid(apache::thrift::TUuid& out, const apache::thrift::TUuid& thing) override {
cout << "[C -> C++] testUuid(\"" << thing << "\")" << '\n';
- return thing;
+ out = thing;
}
void testStruct(Xtruct& out, const Xtruct &thing) override {
@@ -297,7 +297,7 @@
}
void testException(const std::string &arg)
- throw(Xception, apache::thrift::TException) override
+ noexcept(false) override
{
cout << "[C -> C++] testException(" << arg << ")" << '\n';
if (arg.compare("Xception") == 0) {
@@ -315,7 +315,7 @@
}
}
- void testMultiException(Xtruct &result, const std::string &arg0, const std::string &arg1) throw(Xception, Xception2) override {
+ void testMultiException(Xtruct &result, const std::string &arg0, const std::string &arg1) noexcept(false) override {
cout << "[C -> C++] testMultiException(" << arg0 << ", " << arg1 << ")" << '\n';