use the format attribute in more places, disable X11 options when building with GHOST_SDL
This commit is contained in:
@@ -378,6 +378,8 @@ endif()
|
|||||||
|
|
||||||
if(WITH_GHOST_SDL OR WITH_HEADLESS)
|
if(WITH_GHOST_SDL OR WITH_HEADLESS)
|
||||||
set(WITH_GHOST_XDND OFF)
|
set(WITH_GHOST_XDND OFF)
|
||||||
|
set(WITH_X11_XF86VMODE OFF)
|
||||||
|
set(WITH_X11_XINPUT OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
|
@@ -88,8 +88,16 @@ public:
|
|||||||
inline ~STR_String() { delete[] this->m_data; }
|
inline ~STR_String() { delete[] this->m_data; }
|
||||||
|
|
||||||
// Operations
|
// Operations
|
||||||
STR_String& Format(const char *fmt, ...); // Set formatted text to string
|
STR_String& Format(const char *fmt, ...) // Set formatted text to string
|
||||||
STR_String& FormatAdd(const char *fmt, ...); // Add 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 void Clear() { this->m_len = this->m_data[0] = 0; }
|
||||||
inline const STR_String & Reverse()
|
inline const STR_String & Reverse()
|
||||||
{
|
{
|
||||||
@@ -208,12 +216,10 @@ protected:
|
|||||||
#endif
|
#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, 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+(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+(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+(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+(const char *lhs, rcSTR_String rhs) { return STR_String(lhs, strlen(lhs), rhs.ReadPtr(), rhs.Length()); }
|
||||||
|
|
||||||
|
|
||||||
#endif //__STR_STRING_H__
|
#endif //__STR_STRING_H__
|
||||||
|
|
||||||
|
@@ -738,4 +738,3 @@ int STR_String::Serialize(pCStream stream)
|
|||||||
return this->m_len + sizeof(this->m_len);
|
return this->m_len + sizeof(this->m_len);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -80,7 +80,11 @@ void BLI_dynstr_appendf(DynStr *ds, const char *format, ...)
|
|||||||
__attribute__ ((format(printf, 2, 3)))
|
__attribute__ ((format(printf, 2, 3)))
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
void BLI_dynstr_vappendf(DynStr *ds, const char *format, va_list args);
|
void BLI_dynstr_vappendf(DynStr *ds, const char *format, va_list args)
|
||||||
|
#ifdef __GNUC__
|
||||||
|
__attribute__ ((format(printf, 2, 0)))
|
||||||
|
#endif
|
||||||
|
;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the length of a DynStr.
|
* Find the length of a DynStr.
|
||||||
|
@@ -144,7 +144,11 @@ __attribute__((nonnull))
|
|||||||
/*
|
/*
|
||||||
* Replacement for vsnprintf
|
* Replacement for vsnprintf
|
||||||
*/
|
*/
|
||||||
size_t BLI_vsnprintf(char *buffer, size_t count, const char *format, va_list arg);
|
size_t BLI_vsnprintf(char *buffer, size_t count, const char *format, va_list arg)
|
||||||
|
#ifdef __GNUC__
|
||||||
|
__attribute__ ((format(printf, 3, 0)))
|
||||||
|
#endif
|
||||||
|
;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Print formatted string into a newly mallocN'd string
|
* Print formatted string into a newly mallocN'd string
|
||||||
|
@@ -248,6 +248,12 @@ static void convert_tface_mt(FileData *fd, Main *main);
|
|||||||
* bit kludge but better then doubling up on prints,
|
* bit kludge but better then doubling up on prints,
|
||||||
* we could alternatively have a versions of a report function which forces printing - campbell
|
* we could alternatively have a versions of a report function which forces printing - campbell
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
static void BKE_reportf_wrap(ReportList *reports, ReportType type, const char *format, ...)
|
||||||
|
#ifdef __GNUC__
|
||||||
|
__attribute__ ((format(printf, 3, 4)))
|
||||||
|
#endif
|
||||||
|
;
|
||||||
static void BKE_reportf_wrap(ReportList *reports, ReportType type, const char *format, ...)
|
static void BKE_reportf_wrap(ReportList *reports, ReportType type, const char *format, ...)
|
||||||
{
|
{
|
||||||
char fixed_buf[1024]; /* should be long enough */
|
char fixed_buf[1024]; /* should be long enough */
|
||||||
|
@@ -2575,6 +2575,11 @@ static void confirm_cancel_operator(void *opv)
|
|||||||
WM_operator_free(opv);
|
WM_operator_free(opv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void vconfirm_opname(bContext *C, const char *opname, const char *title, const char *itemfmt, va_list ap)
|
||||||
|
#ifdef __GNUC__
|
||||||
|
__attribute__ ((format(printf, 4, 0)))
|
||||||
|
#endif
|
||||||
|
;
|
||||||
static void vconfirm_opname(bContext *C, const char *opname, const char *title, const char *itemfmt, va_list ap)
|
static void vconfirm_opname(bContext *C, const char *opname, const char *title, const char *itemfmt, va_list ap)
|
||||||
{
|
{
|
||||||
uiPopupBlockHandle *handle;
|
uiPopupBlockHandle *handle;
|
||||||
|
Reference in New Issue
Block a user