[PPL-devel] [GIT] ppl/ppl(master): Use consistent parameter names in helper function wrap.
Enea Zaffanella
zaffanella at cs.unipr.it
Mon Mar 23 08:23:03 CET 2009
Module: ppl/ppl
Branch: master
Commit: f2b5e3f20ae7b7912d824a06585407d011aa8137
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=f2b5e3f20ae7b7912d824a06585407d011aa8137
Author: Enea Zaffanella <zaffanella at cs.unipr.it>
Date: Mon Mar 23 08:21:36 2009 +0100
Use consistent parameter names in helper function wrap.
---
src/pretty_print.cc | 10 +++++-----
src/pretty_print.hh | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/pretty_print.cc b/src/pretty_print.cc
index 697f5e6..cba5790 100644
--- a/src/pretty_print.cc
+++ b/src/pretty_print.cc
@@ -185,11 +185,11 @@ size_t wrap(Write_Function& wfunc,
}
void
-wrap(std::string& dst, const std::string& src_string,
+wrap(std::string& dst_string, const std::string& src_string,
unsigned indent_depth,
unsigned preferred_first_line_length,
unsigned preferred_line_length) {
- dst.clear();
+ dst_string.clear();
const char *src = src_string.c_str();
for (int line = 0; ; ++line) {
int linelen = (line == 0
@@ -227,8 +227,8 @@ wrap(std::string& dst, const std::string& src_string,
}
}
if (split_pos > 0 && line > 0 && indent_depth > 0)
- dst.append(indent_depth, ' ');
- dst.append(src, split_pos);
+ dst_string.append(indent_depth, ' ');
+ dst_string.append(src, split_pos);
src += split_pos;
if (isspace(*src))
++src;
@@ -236,7 +236,7 @@ wrap(std::string& dst, const std::string& src_string,
++src;
if (*src == '\0')
break;
- dst.push_back('\n');
+ dst_string.push_back('\n');
}
}
diff --git a/src/pretty_print.hh b/src/pretty_print.hh
index f3ac636..a5504f2 100644
--- a/src/pretty_print.hh
+++ b/src/pretty_print.hh
@@ -142,10 +142,10 @@ c_pretty_print(const T& o, write_function wfunc, void* data,
//! Helper function for the wrapping of lines.
/*!
- \param dst
+ \param dst_string
The destination string.
- \param src
+ \param src_string
The source string holding the lines to wrap.
\param indent_depth
@@ -158,7 +158,7 @@ c_pretty_print(const T& o, write_function wfunc, void* data,
The preferred length for all the lines but the first one.
*/
void
-wrap(std::string& dst, const std::string& src_string,
+wrap(std::string& dst_string, const std::string& src_string,
unsigned indent_depth,
unsigned preferred_first_line_length,
unsigned preferred_line_length);
More information about the PPL-devel
mailing list