include/rtl/strbuf.hxx | 6 ++++++ include/rtl/ustrbuf.hxx | 6 ++++++ 2 files changed, 12 insertions(+)
New commits: commit 102b259754060005a11a82b4fcb2c65e7b0617ce Author: Michael Stahl <mst...@redhat.com> Date: Fri Jan 23 14:28:39 2015 +0100 sal: try to fix prematurely pushed 853c2fc71a96755a9dee629fd5d0e1cff9a48034 Change-Id: Id00e2579edcc9856c0fa3985e34c4a2f3e7ae5ec diff --git a/include/rtl/strbuf.hxx b/include/rtl/strbuf.hxx index 5450472..7c8abf0 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 0240557..d205c63 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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits