diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-01-23 14:28:39 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-01-23 14:28:39 +0100 |
commit | 102b259754060005a11a82b4fcb2c65e7b0617ce (patch) | |
tree | 9a5dcbe8963e49b206ac916ff45bc67e548e7ebb /include/rtl | |
parent | 853c2fc71a96755a9dee629fd5d0e1cff9a48034 (diff) |
sal: try to fix prematurely pushed 853c2fc71a96755a9dee629fd5d0e1cff9a48034
Change-Id: Id00e2579edcc9856c0fa3985e34c4a2f3e7ae5ec
Diffstat (limited to 'include/rtl')
-rw-r--r-- | include/rtl/strbuf.hxx | 6 | ||||
-rw-r--r-- | include/rtl/ustrbuf.hxx | 6 |
2 files changed, 12 insertions, 0 deletions
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<int>(length)) { } +#if SAL_TYPES_SIZEOFLONG == 4 + // additional overloads for sal_Int32 sal_uInt32 explicit OStringBuffer(long length) : OStringBuffer(static_cast<int>(length)) { @@ -109,10 +113,12 @@ public: : OStringBuffer(static_cast<int>(length)) { } +#endif // avoid obvious bugs explicit OStringBuffer(char) = delete; explicit OStringBuffer(sal_Unicode) = delete; #endif +#endif /** Constructs a string buffer so that it represents the same 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<int>(length)) { } +#if SAL_TYPES_SIZEOFLONG == 4 + // additional overloads for sal_Int32 sal_uInt32 explicit OUStringBuffer(long length) : OUStringBuffer(static_cast<int>(length)) { @@ -104,10 +108,12 @@ public: : OUStringBuffer(static_cast<int>(length)) { } +#endif // avoid obvious bugs explicit OUStringBuffer(char) = delete; explicit OUStringBuffer(sal_Unicode) = delete; #endif +#endif /** Constructs a string buffer so that it represents the same |