aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/icu/Collate.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-06-10 22:38:00 +0200
committerMax Kellermann <max@duempel.org>2014-06-10 23:21:09 +0200
commit37b31907525dd3554924ec4144f4345993579376 (patch)
treec73142153d36066bb9bb537b689b122db4cc51b6 /src/lib/icu/Collate.cxx
parentd51265d48f1eb8d2ba7640793d5ce6968805d2c0 (diff)
downloadmpd-37b31907525dd3554924ec4144f4345993579376.tar.gz
mpd-37b31907525dd3554924ec4144f4345993579376.tar.xz
mpd-37b31907525dd3554924ec4144f4345993579376.zip
lib/icu: add IcuInit(), IcuFinish()
Diffstat (limited to '')
-rw-r--r--src/lib/icu/Collate.cxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/lib/icu/Collate.cxx b/src/lib/icu/Collate.cxx
index 4d1526b28..f6621eb21 100644
--- a/src/lib/icu/Collate.cxx
+++ b/src/lib/icu/Collate.cxx
@@ -43,10 +43,11 @@
static UCollator *collator;
#endif
+#ifdef HAVE_ICU
+
bool
IcuCollateInit(Error &error)
{
-#ifdef HAVE_ICU
assert(collator == nullptr);
assert(!error.IsDefined());
@@ -57,9 +58,6 @@ IcuCollateInit(Error &error)
"ucol_open() failed: %s", u_errorName(code));
return false;
}
-#else
- (void)error;
-#endif
return true;
}
@@ -67,15 +65,11 @@ IcuCollateInit(Error &error)
void
IcuCollateFinish()
{
-#ifdef HAVE_ICU
assert(collator != nullptr);
ucol_close(collator);
-#endif
}
-#ifdef HAVE_ICU
-
static WritableBuffer<UChar>
UCharFromUTF8(const char *src)
{