From 102b259754060005a11a82b4fcb2c65e7b0617ce Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 23 Jan 2015 14:28:39 +0100 Subject: sal: try to fix prematurely pushed 853c2fc71a96755a9dee629fd5d0e1cff9a48034 Change-Id: Id00e2579edcc9856c0fa3985e34c4a2f3e7ae5ec --- include/rtl/strbuf.hxx | 6 ++++++ include/rtl/ustrbuf.hxx | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'include/rtl') diff --git a/include/rtl/strbuf.hxx b/include/rtl/strbuf.hxx index 5450472c2fe1..7c8abf099191 100644 --- a/include/rtl/strbuf.hxx +++ b/include/rtl/strbuf.hxx @@ -97,10 +97,14 @@ public: rtl_string_new_WithLength( &pData, length ); } #if __cplusplus >= 201103L + // GCC 4.6 lacks delegating ctors +#if defined(__clang__) || !defined(__GNUC__) || (__GNUC__ > 4) || (__GNUC_MINOR__ > 6) explicit OStringBuffer(unsigned int length) : OStringBuffer(static_cast(length)) { } +#if SAL_TYPES_SIZEOFLONG == 4 + // additional overloads for sal_Int32 sal_uInt32 explicit OStringBuffer(long length) : OStringBuffer(static_cast(length)) { @@ -109,9 +113,11 @@ public: : OStringBuffer(static_cast(length)) { } +#endif // avoid obvious bugs explicit OStringBuffer(char) = delete; explicit OStringBuffer(sal_Unicode) = delete; +#endif #endif /** diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx index 0240557f65ba..d205c63c6984 100644 --- a/include/rtl/ustrbuf.hxx +++ b/include/rtl/ustrbuf.hxx @@ -92,10 +92,14 @@ public: rtl_uString_new_WithLength( &pData, length ); } #if __cplusplus >= 201103L + // GCC 4.6 lacks delegating ctors +#if defined(__clang__) || !defined(__GNUC__) || (__GNUC__ > 4) || (__GNUC_MINOR__ > 6) explicit OUStringBuffer(unsigned int length) : OUStringBuffer(static_cast(length)) { } +#if SAL_TYPES_SIZEOFLONG == 4 + // additional overloads for sal_Int32 sal_uInt32 explicit OUStringBuffer(long length) : OUStringBuffer(static_cast(length)) { @@ -104,9 +108,11 @@ public: : OUStringBuffer(static_cast(length)) { } +#endif // avoid obvious bugs explicit OUStringBuffer(char) = delete; explicit OUStringBuffer(sal_Unicode) = delete; +#endif #endif /** -- cgit