diff options
author | simonb <simonb> | 2006-06-26 01:36:27 (GMT) |
---|---|---|
committer | simonb <simonb> | 2006-06-26 01:36:27 (GMT) |
commit | aedcaea054a91f10329377ca776396326d0078fa (patch) | |
tree | b506c987f26bb8720784a678b6026034f9b17532 /src/FbTk/FbString.cc | |
parent | b699ed4d9e4fd99fd894b5d3d2e3767c41ebf80c (diff) | |
download | fluxbox_pavel-aedcaea054a91f10329377ca776396326d0078fa.zip fluxbox_pavel-aedcaea054a91f10329377ca776396326d0078fa.tar.bz2 |
properly protect usage of iconv_t by HAVE_ICONV
Diffstat (limited to 'src/FbTk/FbString.cc')
-rw-r--r-- | src/FbTk/FbString.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/FbTk/FbString.cc b/src/FbTk/FbString.cc index 3ed1c70..d3f6b81 100644 --- a/src/FbTk/FbString.cc +++ b/src/FbTk/FbString.cc | |||
@@ -231,14 +231,18 @@ bool haveUTF8() { | |||
231 | 231 | ||
232 | }; // end namespace StringUtil | 232 | }; // end namespace StringUtil |
233 | 233 | ||
234 | StringConvertor::StringConvertor(EncodingTarget target): m_iconv((iconv_t)(-1)) { | 234 | StringConvertor::StringConvertor(EncodingTarget target): |
235 | #ifdef HAVE_ICONV | 235 | #ifdef HAVE_ICONV |
236 | m_iconv((iconv_t)(-1)) { | ||
236 | if (target == ToLocaleStr) | 237 | if (target == ToLocaleStr) |
237 | m_destencoding = FbStringUtil::locale_codeset; | 238 | m_destencoding = FbStringUtil::locale_codeset; |
238 | else | 239 | else |
239 | m_destencoding = "UTF-8"; | 240 | m_destencoding = "UTF-8"; |
240 | #endif | ||
241 | } | 241 | } |
242 | #else | ||
243 | m_iconv(-1) {} | ||
244 | #endif | ||
245 | |||
242 | 246 | ||
243 | StringConvertor::~StringConvertor() { | 247 | StringConvertor::~StringConvertor() { |
244 | #ifdef HAVE_ICONV | 248 | #ifdef HAVE_ICONV |