Fix build
frameworks/base/core/jni/android_text_StaticLayout.cpp:358:43: error: overflow in implicit constant conversion [-Werror=overflow]
firstTabIndex = SIZE_MAX;
^
frameworks/base/core/jni/android_text_StaticLayout.cpp:367:43: error: overflow in implicit constant conversion [-Werror=overflow]
firstTabIndex = SIZE_MAX;
^
frameworks/base/core/jni/android_text_StaticLayout.cpp:391:39: error: overflow in implicit constant conversion [-Werror=overflow]
firstTabIndex = SIZE_MAX;
^
cc1plus: all warnings being treated as errors
make: *** [out/target/product/generic_arm64/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/android_text_StaticLayout.o] Error 1
Change-Id: I2364f697588c8657ba5f2d15cf1d60a174655613
This commit is contained in:
@@ -355,7 +355,7 @@ class GreedyLineBreaker : public LineBreaker {
|
||||
breaks->push_back(mPrimitives[goodBreakIndex].location);
|
||||
widths->push_back(goodBreakWidth);
|
||||
flags->push_back(firstTabIndex < goodBreakIndex);
|
||||
firstTabIndex = SIZE_MAX;
|
||||
firstTabIndex = INT_MAX;
|
||||
} else {
|
||||
// must split a word because there is no other option
|
||||
i = breakIndex; // no +1 because of i++
|
||||
@@ -364,7 +364,7 @@ class GreedyLineBreaker : public LineBreaker {
|
||||
breaks->push_back(mPrimitives[breakIndex].location);
|
||||
widths->push_back(breakWidth);
|
||||
flags->push_back(firstTabIndex < breakIndex);
|
||||
firstTabIndex = SIZE_MAX;
|
||||
firstTabIndex = INT_MAX;
|
||||
}
|
||||
printedWidth = width = 0;
|
||||
goodBreakFound = breakFound = false;
|
||||
@@ -388,7 +388,7 @@ class GreedyLineBreaker : public LineBreaker {
|
||||
breaks->push_back(p.location);
|
||||
widths->push_back(printedWidth);
|
||||
flags->push_back(firstTabIndex < i);
|
||||
firstTabIndex = SIZE_MAX;
|
||||
firstTabIndex = INT_MAX;
|
||||
printedWidth = width = 0;
|
||||
goodBreakFound = breakFound = false;
|
||||
goodBreakWidth = breakWidth = 0;
|
||||
|
||||
Reference in New Issue
Block a user