X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/da8ec666c391d382638f3ef518a30650ff08b436..0199ba108d66c94df94e4f044994e79efdece4b1:/include/xbt/string.hpp diff --git a/include/xbt/string.hpp b/include/xbt/string.hpp index 87ea38383e..c23e6f0b6c 100644 --- a/include/xbt/string.hpp +++ b/include/xbt/string.hpp @@ -31,13 +31,13 @@ namespace xbt { * * @ingroup XBT_str */ -XBT_PUBLIC std::string string_printf(const char* fmt, ...); +XBT_PUBLIC std::string string_printf(const char* fmt, ...) XBT_ATTRIB_PRINTF(1, 2); /** Create a C++ string from a C-style format * * @ingroup XBT_str */ -XBT_PUBLIC std::string string_vprintf(const char* fmt, va_list ap); +XBT_PUBLIC std::string string_vprintf(const char* fmt, va_list ap) XBT_ATTRIB_PRINTF(1, 0); #if SIMGRID_HAVE_MC @@ -145,7 +145,7 @@ public: // Capacity size_t size() const { return str.len; } size_t length() const { return str.len; } - bool empty() const { return str.len != 0; } + bool empty() const { return str.len == 0; } void shrink_to_fit() { /* Being there, but doing nothing */} // Element access