From 6b6c2f608715c90ee76eb5af7c1bc6540720ef27 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Wed, 11 Dec 2019 13:16:57 +0300 Subject: [PATCH] gapi: fix build with GCC 4.8 --- modules/gapi/src/backends/fluid/gfluidbuffer.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/gapi/src/backends/fluid/gfluidbuffer.cpp b/modules/gapi/src/backends/fluid/gfluidbuffer.cpp index f0e866ab93..e2a78078df 100644 --- a/modules/gapi/src/backends/fluid/gfluidbuffer.cpp +++ b/modules/gapi/src/backends/fluid/gfluidbuffer.cpp @@ -347,12 +347,20 @@ std::unique_ptr createStorage(int capacity, int desc_width std::unique_ptr storage(new BufferStorageWithBorder); storage->init(type, border_size, border.value()); storage->create(capacity, desc_width, type); +#if defined __GNUC__ && __GNUC__ < 5 + return std::move(storage); +#else return storage; +#endif } std::unique_ptr storage(new BufferStorageWithoutBorder); storage->create(capacity, desc_width, type); +#if defined __GNUC__ && __GNUC__ < 5 + return std::move(storage); +#else return storage; +#endif } std::unique_ptr createStorage(const cv::gapi::own::Mat& data, cv::gapi::own::Rect roi); @@ -360,7 +368,11 @@ std::unique_ptr createStorage(const cv::gapi::own::Mat& data, cv: { std::unique_ptr storage(new BufferStorageWithoutBorder); storage->attach(data, roi); +#if defined __GNUC__ && __GNUC__ < 5 + return std::move(storage); +#else return storage; +#endif } } // namespace } // namespace fluid