Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-09-16 14:39:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-16 14:39:19 +0400
commite84b300d9e2f0a34a75d6e295e12ed1e095e9f09 (patch)
tree65507a5986955aa9a47ac9309c40a6c0e6dc08c1 /intern/string
parentb3d2ea28ceaaff9bcec1b47d148414997876f229 (diff)
use the format attribute in more places, disable X11 options when building with GHOST_SDL
Diffstat (limited to 'intern/string')
-rw-r--r--intern/string/STR_String.h24
-rw-r--r--intern/string/intern/STR_String.cpp1
2 files changed, 15 insertions, 10 deletions
diff --git a/intern/string/STR_String.h b/intern/string/STR_String.h
index 6e9f6007e0b..a3d367a6fef 100644
--- a/intern/string/STR_String.h
+++ b/intern/string/STR_String.h
@@ -88,8 +88,16 @@ public:
inline ~STR_String() { delete[] this->m_data; }
// Operations
- STR_String& Format(const char *fmt, ...); // Set formatted text to string
- STR_String& FormatAdd(const char *fmt, ...); // Add formatted text to string
+ STR_String& Format(const char *fmt, ...) // Set formatted text to string
+#ifdef __GNUC__
+ __attribute__ ((format(printf, 2, 3)))
+#endif
+ ;
+ STR_String& FormatAdd(const char *fmt, ...) // Add formatted text to string
+#ifdef __GNUC__
+ __attribute__ ((format(printf, 2, 3)))
+#endif
+ ;
inline void Clear() { this->m_len = this->m_data[0] = 0; }
inline const STR_String & Reverse()
{
@@ -208,12 +216,10 @@ protected:
#endif
};
-inline STR_String operator+(rcSTR_String lhs, rcSTR_String rhs) { return STR_String(lhs.ReadPtr(), lhs.Length(), rhs.ReadPtr(), rhs.Length()); }
-inline STR_String operator+(rcSTR_String lhs, char rhs) { return STR_String(lhs.ReadPtr(), lhs.Length(), &rhs, 1); }
-inline STR_String operator+(char lhs, rcSTR_String rhs) { return STR_String(&lhs, 1, rhs.ReadPtr(), rhs.Length()); }
-inline STR_String operator+(rcSTR_String lhs, const char *rhs) { return STR_String(lhs.ReadPtr(), lhs.Length(), rhs, strlen(rhs)); }
-inline STR_String operator+(const char *lhs, rcSTR_String rhs) { return STR_String(lhs, strlen(lhs), rhs.ReadPtr(), rhs.Length()); }
-
+inline STR_String operator+(rcSTR_String lhs, rcSTR_String rhs) { return STR_String(lhs.ReadPtr(), lhs.Length(), rhs.ReadPtr(), rhs.Length()); }
+inline STR_String operator+(rcSTR_String lhs, char rhs) { return STR_String(lhs.ReadPtr(), lhs.Length(), &rhs, 1); }
+inline STR_String operator+(char lhs, rcSTR_String rhs) { return STR_String(&lhs, 1, rhs.ReadPtr(), rhs.Length()); }
+inline STR_String operator+(rcSTR_String lhs, const char *rhs) { return STR_String(lhs.ReadPtr(), lhs.Length(), rhs, strlen(rhs)); }
+inline STR_String operator+(const char *lhs, rcSTR_String rhs) { return STR_String(lhs, strlen(lhs), rhs.ReadPtr(), rhs.Length()); }
#endif //__STR_STRING_H__
-
diff --git a/intern/string/intern/STR_String.cpp b/intern/string/intern/STR_String.cpp
index 4b2261e89f9..283b44380ee 100644
--- a/intern/string/intern/STR_String.cpp
+++ b/intern/string/intern/STR_String.cpp
@@ -738,4 +738,3 @@ int STR_String::Serialize(pCStream stream)
return this->m_len + sizeof(this->m_len);
}
#endif
-