Revert "Move all toString to be in users of HIDL libs."
This reverts commit 32bfbeb9ec923717eb4efaf03278ef2326b9325e.
Reason for revert: prebuilts have a problem with this.
Change-Id: I4ab5790b88ef137fdfbc4788121949c24bd0a307
diff --git a/Interface.cpp b/Interface.cpp
index 36f7735..5974288 100644
--- a/Interface.cpp
+++ b/Interface.cpp
@@ -729,19 +729,9 @@
if (status != OK) {
return status;
}
-
- out << "static inline std::string toString("
+ out << "std::string toString("
<< getCppArgumentType()
- << " o) ";
-
- out.block([&] {
- out << "std::string os = \"[class or subclass of \";\n"
- << "os += " << fullName() << "::descriptor;\n"
- << "os += \"]\";\n"
- << "os += o->isRemote() ? \"@remote\" : \"@local\";\n"
- << "return os;\n";
- }).endl().endl();
-
+ << ");\n";
return OK;
}
@@ -754,6 +744,18 @@
return err;
}
+ out << "std::string toString("
+ << getCppArgumentType()
+ << " o) ";
+
+ out.block([&] {
+ out << "std::string os = \"[class or subclass of \";\n"
+ << "os += " << fullName() << "::descriptor;\n"
+ << "os += \"]\";\n"
+ << "os += o->isRemote() ? \"@remote\" : \"@local\";\n"
+ << "return os;\n";
+ }).endl().endl();
+
return OK;
}