summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-09-14 19:39:56 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-09-14 19:39:56 -0400
commit62389888b6742d91187f40527f68a41b1f32db67 (patch)
treedd204515e90d404b9dbabc3133e58bc69c201e7f
parent9a98beab38c13bbc623bd1ee9b2c0387c92d3998 (diff)
downloadfork-ledger-62389888b6742d91187f40527f68a41b1f32db67.tar.gz
fork-ledger-62389888b6742d91187f40527f68a41b1f32db67.tar.bz2
fork-ledger-62389888b6742d91187f40527f68a41b1f32db67.zip
The ledger::string type now uses size_type for a length parameter instead of
"const int", which is not portable.
-rw-r--r--src/utils.cc4
-rw-r--r--src/utils.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/utils.cc b/src/utils.cc
index 2f563dde..8f296341 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -387,8 +387,8 @@ string::string(const string& str) : std::string(str) {
string::string(const std::string& str) : std::string(str) {
TRACE_CTOR(string, "const std::string&");
}
-string::string(const int len, char x) : std::string(len, x) {
- TRACE_CTOR(string, "const int, char");
+string::string(size_type len, char x) : std::string(len, x) {
+ TRACE_CTOR(string, "size_type, char");
}
string::string(const char * str) : std::string(str) {
TRACE_CTOR(string, "const char *");
diff --git a/src/utils.h b/src/utils.h
index 60d47ec1..74af6590 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -181,7 +181,7 @@ public:
string();
string(const string& str);
string(const std::string& str);
- string(const int len, char x);
+ string(size_type len, char x);
string(const char * str);
string(const char * str, const char * end);
string(const string& str, int x);