diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2018-01-27 19:54:46 +0000 |
---|---|---|
committer | Tor Egge <Tor.Egge@broadpark.no> | 2018-01-27 20:11:09 +0000 |
commit | a4f99982eecf338f73f150d4fca8fe95c26bc1ae (patch) | |
tree | deee8d0a9a81553f5f17a6baad7880e63cf13685 /searchlib | |
parent | 8f9bd95327bc5848c141df11fafd3544b2ee73c6 (diff) |
Don't use uint16_t when UChar is needed.
Include needed unicode header file.
Diffstat (limited to 'searchlib')
-rw-r--r-- | searchlib/src/tests/sort/sort_test.cpp | 2 | ||||
-rw-r--r-- | searchlib/src/tests/sort/uca.cpp | 2 | ||||
-rw-r--r-- | searchlib/src/vespa/searchlib/uca/ucaconverter.cpp | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/searchlib/src/tests/sort/sort_test.cpp b/searchlib/src/tests/sort/sort_test.cpp index ac2c22a0035..1c9ea0efda0 100644 --- a/searchlib/src/tests/sort/sort_test.cpp +++ b/searchlib/src/tests/sort/sort_test.cpp @@ -62,7 +62,7 @@ void Test::testIcu() { { const std::string src("Creation of Bob2007 this is atumated string\this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string;this is atumated string; _ 12345567890-=,./;'[;"); - std::vector<uint16_t> u16Buffer(100); + std::vector<UChar> u16Buffer(100); UErrorCode status = U_ZERO_ERROR; int32_t u16Wanted(0); u_strFromUTF8(&u16Buffer[0], u16Buffer.size(), &u16Wanted, src.c_str(), -1, &status); diff --git a/searchlib/src/tests/sort/uca.cpp b/searchlib/src/tests/sort/uca.cpp index 579f3e7906e..d7a2f66c2d8 100644 --- a/searchlib/src/tests/sort/uca.cpp +++ b/searchlib/src/tests/sort/uca.cpp @@ -34,7 +34,7 @@ void Test::testFromDat() coll->setStrength(Collator::PRIMARY); - std::vector<uint16_t> u16buffer(100); + std::vector<UChar> u16buffer(100); std::vector<uint8_t> u8buffer(10); int fd = open("sort-blobs.dat", O_RDONLY); diff --git a/searchlib/src/vespa/searchlib/uca/ucaconverter.cpp b/searchlib/src/vespa/searchlib/uca/ucaconverter.cpp index 47d66a94d9e..fffcc782298 100644 --- a/searchlib/src/vespa/searchlib/uca/ucaconverter.cpp +++ b/searchlib/src/vespa/searchlib/uca/ucaconverter.cpp @@ -1,6 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "ucaconverter.h" +#include <unicode/ustring.h> #include <vespa/vespalib/util/stringfmt.h> #include <vespa/vespalib/text/utf8.h> #include <mutex> |