summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/VbUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Slice/VbUtil.cpp')
-rwxr-xr-xcpp/src/Slice/VbUtil.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/cpp/src/Slice/VbUtil.cpp b/cpp/src/Slice/VbUtil.cpp
index 76497a14d83..7d934b1fd5a 100755
--- a/cpp/src/Slice/VbUtil.cpp
+++ b/cpp/src/Slice/VbUtil.cpp
@@ -187,23 +187,6 @@ Slice::VbGenerator::typeToString(const TypePtr& type)
return "???";
}
-static string
-toArrayAlloc(const string& decl, const string& sz)
-{
- int count = 0;
- string::size_type pos = decl.size();
- while(pos > 1 && decl.substr(pos - 2, 2) == "()")
- {
- ++count;
- pos -= 2;
- }
- assert(count > 0);
-
- ostringstream o;
- o << decl.substr(0, pos) << '(' << sz << ')' << decl.substr(pos + 2);
- return o.str();
-}
-
bool
Slice::VbGenerator::isValueType(const TypePtr& type)
{
@@ -812,6 +795,23 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
return;
}
+string
+Slice::VbGenerator::toArrayAlloc(const string& decl, const string& sz)
+{
+ int count = 0;
+ string::size_type pos = decl.size();
+ while(pos > 1 && decl.substr(pos - 2, 2) == "()")
+ {
+ ++count;
+ pos -= 2;
+ }
+ assert(count > 0);
+
+ ostringstream o;
+ o << decl.substr(0, pos) << '(' << sz << ')' << decl.substr(pos + 2);
+ return o.str();
+}
+
void
Slice::VbGenerator::validateMetaData(const UnitPtr& unit)
{