提交 815bc4a8 编写于 作者: M Martijn Coenen

Fix calls to deprecated range_x.

Test: fixes master build.
Change-Id: I8b2822d310c0cf423b15834e6d6ae3a9ea64233b
上级 160fdd1f
......@@ -30,8 +30,8 @@ static void BM_FontCollection_hasVariationSelector(benchmark::State& state) {
MinikinAutoUnref<FontCollection> collection(
getFontCollection(SYSTEM_FONT_PATH, SYSTEM_FONT_XML));
uint32_t baseCp = state.range_x();
uint32_t vsCp = state.range_y();
uint32_t baseCp = state.range(0);
uint32_t vsCp = state.range(1);
char titleBuffer[64];
snprintf(titleBuffer, 64, "hasVariationSelector U+%04X,U+%04X", baseCp, vsCp);
......@@ -66,7 +66,7 @@ static void BM_FontCollection_itemize(benchmark::State& state) {
MinikinAutoUnref<FontCollection> collection(
getFontCollection(SYSTEM_FONT_PATH, SYSTEM_FONT_XML));
size_t testIndex = state.range_x();
size_t testIndex = state.range(0);
state.SetLabel("Itemize: " + ITEMIZE_TEST_CASES[testIndex].labelText);
uint16_t buffer[64];
......
......@@ -36,7 +36,7 @@ static void BM_GraphemeBreak_Ascii(benchmark::State& state) {
uint16_t buffer[12];
ParseUnicode(buffer, 12, ASCII_TEST_STR, &result_size, nullptr);
LOG_ALWAYS_FATAL_IF(result_size != 12);
const size_t testIndex = state.range_x();
const size_t testIndex = state.range(0);
while (state.KeepRunning()) {
GraphemeBreak::isGraphemeBreak(buffer, 0, result_size, testIndex);
}
......@@ -51,7 +51,7 @@ static void BM_GraphemeBreak_Emoji(benchmark::State& state) {
uint16_t buffer[12];
ParseUnicode(buffer, 12, EMOJI_TEST_STR, &result_size, nullptr);
LOG_ALWAYS_FATAL_IF(result_size != 12);
const size_t testIndex = state.range_x();
const size_t testIndex = state.range(0);
while (state.KeepRunning()) {
GraphemeBreak::isGraphemeBreak(buffer, 0, result_size, testIndex);
}
......@@ -66,7 +66,7 @@ static void BM_GraphemeBreak_Emoji_Flags(benchmark::State& state) {
uint16_t buffer[12];
ParseUnicode(buffer, 12, FLAGS_TEST_STR, &result_size, nullptr);
LOG_ALWAYS_FATAL_IF(result_size != 12);
const size_t testIndex = state.range_x();
const size_t testIndex = state.range(0);
while (state.KeepRunning()) {
GraphemeBreak::isGraphemeBreak(buffer, 0, result_size, testIndex);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册