From 86bddd0725adc3feef1d271c9312f1c5f8b943ac Mon Sep 17 00:00:00 2001 From: DannyIsFunny <912790387@qq.com> Date: Sun, 27 Sep 2020 09:18:01 +0000 Subject: [PATCH] test=develop --- lite/core/memory.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lite/core/memory.h b/lite/core/memory.h index 380222c764..370db28918 100644 --- a/lite/core/memory.h +++ b/lite/core/memory.h @@ -142,8 +142,8 @@ class Buffer { if (target != target_ || cl_image2d_width_ < img_w_req || cl_image2d_height_ < img_h_req || host_ptr != nullptr) { CHECK_EQ(own_data_, true) << "Can not reset unowned buffer."; - cl_image2d_width_ = std::max(cl_image2d_width_, img_w_req); - cl_image2d_height_ = std::max(cl_image2d_height_, img_h_req); + cl_image2d_width_ = (std::max)(cl_image2d_width_, img_w_req); + cl_image2d_height_ = (std::max)(cl_image2d_height_, img_h_req); Free(); data_ = TargetWrapperCL::MallocImage( cl_image2d_width_, cl_image2d_height_, host_ptr); -- GitLab