Method: Make function call slightly more efficient
We recently changed the Method constructor to take a const std::string&,
so it's more efficient for us to directly pass in 'mName', instead
of passing in the c_str() result, which would force the construction
of another std::string.
Test: TreeHugger
Change-Id: Iff8257f99d11b95d4a4de638d508e5f3f12cc939
diff --git a/Method.cpp b/Method.cpp
index 797e503..51cc206 100644
--- a/Method.cpp
+++ b/Method.cpp
@@ -154,7 +154,7 @@
}
Method* Method::copySignature() const {
- Method* method = new Method(mName.c_str(), mArgs, mResults, mOneway, mAnnotations, location());
+ Method* method = new Method(mName, mArgs, mResults, mOneway, mAnnotations, location());
method->setDocComment(getDocComment());
return method;
}