* src/data.hh (dyn::data::is_const)
* src/function_loader.cc (dyn::gen_cxx_path::gen_cxx_path)
(dyn::function_loader_t::gen_cxx):
Use std::string::size() instead of std::string::length().
---
extatica/ChangeLog | 9 +++++++++
extatica/src/data.hh | 2 +-
extatica/src/function_loader.cc | 4 ++--
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/extatica/ChangeLog b/extatica/ChangeLog
index a94bfce..3ab3311 100644
--- a/extatica/ChangeLog
+++ b/extatica/ChangeLog
@@ -1,5 +1,14 @@
2010-11-03 Roland Levillain <roland(a)lrde.epita.fr>
+ Use std::string uniformly.
+
+ * src/data.hh (dyn::data::is_const)
+ * src/function_loader.cc (dyn::gen_cxx_path::gen_cxx_path)
+ (dyn::function_loader_t::gen_cxx):
+ Use std::string::size() instead of std::string::length().
+
+2010-11-03 Roland Levillain <roland(a)lrde.epita.fr>
+
Handle 64-bit hosts properly.
* src/function_loader.cc (dyn::foreach_path_in_paths)
diff --git a/extatica/src/data.hh b/extatica/src/data.hh
index 0725464..70b4f99 100644
--- a/extatica/src/data.hh
+++ b/extatica/src/data.hh
@@ -356,7 +356,7 @@ namespace dyn {
{
std::string type_(type());
return type_.find("dyn::data_proxy_by_ref<") == 0
- && type_.rfind("const>") == type_.length() - 6;
+ && type_.rfind("const>") == type_.size() - 6;
}
meth method(const std::string& method_name);
diff --git a/extatica/src/function_loader.cc b/extatica/src/function_loader.cc
index 35e5270..090569f 100644
--- a/extatica/src/function_loader.cc
+++ b/extatica/src/function_loader.cc
@@ -112,7 +112,7 @@ namespace dyn {
ostr << "#include ";
if (path.find("<") == std::string::npos
|| path.find("\"") == std::string::npos)
- if (path.find(".hh") == path.length() - 3)
+ if (path.find(".hh") == path.size() - 3)
ostr << "\"" << path << "\"";
else
ostr << "<" << path << ">";
@@ -208,7 +208,7 @@ namespace dyn {
str::size_type pos;
while ((pos = stripped_type.find(" ")) != str::npos)
stripped_type.erase(pos, 1);
- std::string::size_type len = stripped_type.length();
+ std::string::size_type len = stripped_type.size();
first_type_is_ptr =
((stripped_type.compare(len - 7, 7, "*const>") == 0)
|| (stripped_type.compare(len - 2, 2, "*>") == 0));
--
1.5.6.5