A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rewrite without goto going backward.
[simgrid.git]
/
include
/
xbt
/
string.hpp
diff --git
a/include/xbt/string.hpp
b/include/xbt/string.hpp
index
14c9696
..
7d665ff
100644
(file)
--- a/
include/xbt/string.hpp
+++ b/
include/xbt/string.hpp
@@
-57,7
+57,6
@@
struct string_data {
XBT_PUBLIC_CLASS string : private string_data {
static const char NUL;
public:
XBT_PUBLIC_CLASS string : private string_data {
static const char NUL;
public:
-
// Types
typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type;
// Types
typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type;
@@
-137,7
+136,7
@@
public:
size_t size() const { return len; }
size_t length() const { return len; }
bool empty() const { return len != 0; }
size_t size() const { return len; }
size_t length() const { return len; }
bool empty() const { return len != 0; }
- void shrink_to_fit() {}
+ void shrink_to_fit() {
/* Being there, but doing nothing */
}
// Alement access
char* data() { return string_data::data; }
// Alement access
char* data() { return string_data::data; }
@@
-165,6
+164,7
@@
public:
return data()[i];
}
// Conversion
return data()[i];
}
// Conversion
+ static string_data& to_string_data(string& s) { return s; }
operator std::string() const { return std::string(this->c_str(), this->size()); }
// Iterators
operator std::string() const { return std::string(this->c_str(), this->size()); }
// Iterators