diff options
author | Josh Stone <jistone@redhat.com> | 2009-09-02 16:14:08 -0700 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2009-09-02 16:14:08 -0700 |
commit | aca66a36681ac7cbf7fcc2eac4dafc83d6559ef9 (patch) | |
tree | 0e8f39ae14f5793b37b0565c4a17811b696c9f9b /elaborate.cxx | |
parent | d185503c723ded087ff987e8fa08c2418e60006b (diff) | |
download | systemtap-steved-aca66a36681ac7cbf7fcc2eac4dafc83d6559ef9.tar.gz systemtap-steved-aca66a36681ac7cbf7fcc2eac4dafc83d6559ef9.tar.xz systemtap-steved-aca66a36681ac7cbf7fcc2eac4dafc83d6559ef9.zip |
Unify lex_cast* and avoid string copies
We always use lex_cast either to string or from string, so I made that
explicit, and got rid of some string copies in the process. There was
also stringify(), which was redundant to lex_cast<string>.
We also always used lex_cast_hex to string, so that's now hard-coded and
again eliminated a string copy.
For lex_cast_qstring<string>, there's no need to write the streamify the
input, so a specialization now operates directly on the input.
Hopefully this is a bit cleaner, and I do measure it to be a little
faster on scripts with many probes.
Diffstat (limited to 'elaborate.cxx')
-rw-r--r-- | elaborate.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/elaborate.cxx b/elaborate.cxx index 17f335d0..c1a2e898 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -331,7 +331,7 @@ match_node::find_and_build (systemtap_session& s, alternatives += string(" ") + i->first.str(); throw semantic_error (string("probe point truncated at position ") + - lex_cast<string> (pos) + + lex_cast (pos) + " (follow:" + alternatives + ")", loc->tok); } @@ -416,7 +416,7 @@ match_node::find_and_build (systemtap_session& s, alternatives += string(" ") + i->first.str(); throw semantic_error(string("probe point mismatch at position ") + - lex_cast<string> (pos) + + lex_cast (pos) + " (alternatives:" + alternatives + ")" + " didn't find any wildcard matches", loc->tok); @@ -433,7 +433,7 @@ match_node::find_and_build (systemtap_session& s, alternatives += string(" ") + i->first.str(); throw semantic_error (string("probe point mismatch at position ") + - lex_cast<string> (pos) + + lex_cast (pos) + " (alternatives:" + alternatives + ")", loc->tok); } |