Merge pull request #3963 from mapycz/icu-namespace
v3.0.x: Qualify ICU types explicitly
This commit is contained in:
commit
cdfba12f07
3 changed files with 5 additions and 3 deletions
|
@ -42,7 +42,7 @@ ICU_LIBS_DEFAULT='/usr/'
|
||||||
|
|
||||||
DEFAULT_CC = "cc"
|
DEFAULT_CC = "cc"
|
||||||
DEFAULT_CXX = "c++"
|
DEFAULT_CXX = "c++"
|
||||||
DEFAULT_CXX11_CXXFLAGS = " -std=c++11"
|
DEFAULT_CXX11_CXXFLAGS = " -std=c++11 -DU_USING_ICU_NAMESPACE=0"
|
||||||
DEFAULT_CXX11_LINKFLAGS = ""
|
DEFAULT_CXX11_LINKFLAGS = ""
|
||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
# homebrew default
|
# homebrew default
|
||||||
|
|
|
@ -37,7 +37,7 @@ struct ParenStackEntry
|
||||||
UScriptCode scriptCode = USCRIPT_INVALID_CODE;
|
UScriptCode scriptCode = USCRIPT_INVALID_CODE;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ScriptRun : public UObject {
|
class ScriptRun : public icu::UObject {
|
||||||
public:
|
public:
|
||||||
ScriptRun();
|
ScriptRun();
|
||||||
|
|
||||||
|
|
|
@ -213,6 +213,7 @@ void text_layout::layout()
|
||||||
// At the end everything that is left over is added as the final line.
|
// At the end everything that is left over is added as the final line.
|
||||||
void text_layout::break_line_icu(std::pair<unsigned, unsigned> && line_limits)
|
void text_layout::break_line_icu(std::pair<unsigned, unsigned> && line_limits)
|
||||||
{
|
{
|
||||||
|
using BreakIterator = icu::BreakIterator;
|
||||||
text_line line(line_limits.first, line_limits.second);
|
text_line line(line_limits.first, line_limits.second);
|
||||||
shape_text(line);
|
shape_text(line);
|
||||||
|
|
||||||
|
@ -234,7 +235,7 @@ void text_layout::break_line_icu(std::pair<unsigned, unsigned> && line_limits)
|
||||||
}
|
}
|
||||||
|
|
||||||
mapnik::value_unicode_string const& text = itemizer_.text();
|
mapnik::value_unicode_string const& text = itemizer_.text();
|
||||||
Locale locale; // TODO: Is the default constructor correct?
|
icu::Locale locale; // TODO: Is the default constructor correct?
|
||||||
UErrorCode status = U_ZERO_ERROR;
|
UErrorCode status = U_ZERO_ERROR;
|
||||||
std::unique_ptr<BreakIterator> breakitr(BreakIterator::createLineInstance(locale, status));
|
std::unique_ptr<BreakIterator> breakitr(BreakIterator::createLineInstance(locale, status));
|
||||||
|
|
||||||
|
@ -342,6 +343,7 @@ inline int adjust_last_break_position (int pos, bool repeat_wrap_char)
|
||||||
|
|
||||||
void text_layout::break_line(std::pair<unsigned, unsigned> && line_limits)
|
void text_layout::break_line(std::pair<unsigned, unsigned> && line_limits)
|
||||||
{
|
{
|
||||||
|
using BreakIterator = icu::BreakIterator;
|
||||||
text_line line(line_limits.first, line_limits.second);
|
text_line line(line_limits.first, line_limits.second);
|
||||||
shape_text(line);
|
shape_text(line);
|
||||||
double scaled_wrap_width = wrap_width_ * scale_factor_;
|
double scaled_wrap_width = wrap_width_ * scale_factor_;
|
||||||
|
|
Loading…
Add table
Reference in a new issue