[cfe-commits] r48544 - /cfe/trunk/include/clang/Rewrite/Rewriter.h
Ted Kremenek
kremenek at apple.com
Wed Mar 19 09:32:35 PDT 2008
Author: kremenek
Date: Wed Mar 19 11:32:34 2008
New Revision: 48544
URL: http://llvm.org/viewvc/llvm-project?rev=48544&view=rev
Log:
Minor speed tweak per Chris's suggestion: use &S[0] instead of S.c_str().
Modified:
cfe/trunk/include/clang/Rewrite/Rewriter.h
Modified: cfe/trunk/include/clang/Rewrite/Rewriter.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Rewrite/Rewriter.h?rev=48544&r1=48543&r2=48544&view=diff
==============================================================================
--- cfe/trunk/include/clang/Rewrite/Rewriter.h (original)
+++ cfe/trunk/include/clang/Rewrite/Rewriter.h Wed Mar 19 11:32:34 2008
@@ -184,11 +184,11 @@
}
bool InsertStrBefore(SourceLocation Loc, const std::string& S) {
- return S.empty() ? false : InsertTextBefore(Loc, S.c_str(), S.size());
+ return S.empty() ? false : InsertTextBefore(Loc, &S[0], S.size());
}
bool InsertStrAfter(SourceLocation Loc, const std::string& S) {
- return S.empty() ? false : InsertTextAfter(Loc, S.c_str(), S.size());
+ return S.empty() ? false : InsertTextAfter(Loc, &S[0], S.size());
}
More information about the cfe-commits
mailing list