From 35a53e4178794f079bbbecd791b7af5fd27bcb1d Mon Sep 17 00:00:00 2001 From: Pedro Larroy Date: Wed, 1 Aug 2018 16:31:25 +0200 Subject: [PATCH] Fix data narrowing warning on graph_executor.cc --- src/executor/graph_executor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/executor/graph_executor.cc b/src/executor/graph_executor.cc index 7386de4d12e3..33c6f574a044 100644 --- a/src/executor/graph_executor.cc +++ b/src/executor/graph_executor.cc @@ -1282,7 +1282,7 @@ void GraphExecutor::InitDataEntryMemory(std::vector* shared_pool) { for (size_t i = 0; i < pool_info.size(); i++) { sorted_pool_index.push_back(i); } - auto pool_comparator = [&pool_info](int lhs, int rhs){ + auto pool_comparator = [&pool_info](size_t lhs, size_t rhs){ return pool_info[lhs].bytes > pool_info[rhs].bytes; }; std::sort(sorted_pool_index.begin(), sorted_pool_index.end(), pool_comparator);