diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-09-16 10:05:52 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-16 10:05:52 +0200 |
commit | 9de4f3b3fd7843f27ea69788b6e37c5022ac2ad3 (patch) | |
tree | 72979682b6a8e09f74f3625c13a4c56ea6298c8c /connectivity/source/drivers | |
parent | 8ab9ea00b62d357195d73c4518646255a2b723cd (diff) |
-Werror,-Wunused-function, plus additional clean-up and fixes
Change-Id: I4a2b67ba186e205a7cb4757a4f7120b9393823d0
Diffstat (limited to 'connectivity/source/drivers')
-rw-r--r-- | connectivity/source/drivers/odbc/OTools.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/connectivity/source/drivers/odbc/OTools.cxx b/connectivity/source/drivers/odbc/OTools.cxx index 1fc2b0638948..8b459de1bdd4 100644 --- a/connectivity/source/drivers/odbc/OTools.cxx +++ b/connectivity/source/drivers/odbc/OTools.cxx @@ -401,21 +401,22 @@ Sequence<sal_Int8> OTools::getBytesValue(const OConnection* _pConnection, namespace { - template < typename C > inline void append(OUStringBuffer s, C* d, sal_Int32 n); - - template <> inline void append(OUStringBuffer s, wchar_t* d, sal_Int32 n) +// Approximation of "#if sizeof (SQLWCHAR) == 4 && sizeof (wchar_t) == 4": +#if defined SQL_WCHART_CONVERT && defined SAL_UNICODE_NOTEQUAL_WCHAR_T + BOOST_STATIC_ASSERT(sizeof (wchar_t) == 4); + void append(OUStringBuffer & s, wchar_t* d, sal_Int32 n) { - assert(sizeof(wchar_t) == 4); for (sal_Int32 i = 0; i < n; ++i) { s.appendUtf32(d[i]); } } - - template <> inline void append(OUStringBuffer s, sal_Unicode* d, sal_Int32 n) +#else + void append(OUStringBuffer & s, sal_Unicode* d, sal_Int32 n) { s.append(d, n); } +#endif } OUString OTools::getStringValue(OConnection* _pConnection, |