diff --git a/cras_cpp_common/src/log_utils/nodelet.cpp b/cras_cpp_common/src/log_utils/nodelet.cpp index fbea061..0e5e54f 100644 --- a/cras_cpp_common/src/log_utils/nodelet.cpp +++ b/cras_cpp_common/src/log_utils/nodelet.cpp @@ -20,7 +20,7 @@ const static std::string NOT_SET {"getNameFn is not set!"}; // NOLINT NodeletLogHelper::NodeletLogHelper(const GetNameFn& getNameFn) : getNameFn(getNameFn) { if (!this->getNameFn) - this->getNameFn = [](){ return NOT_SET; }; + this->getNameFn = []() -> const std::string& { return NOT_SET; }; } void NodeletLogHelper::initializeLogLocationImpl( diff --git a/image_transport_codecs/src/codecs/compressed_depth_codec.cpp b/image_transport_codecs/src/codecs/compressed_depth_codec.cpp index 4e79ee0..57da643 100644 --- a/image_transport_codecs/src/codecs/compressed_depth_codec.cpp +++ b/image_transport_codecs/src/codecs/compressed_depth_codec.cpp @@ -378,7 +378,7 @@ cv::Mat CompressedDepthCodec::decodeRVL(const std::vector& compressed) if (rows == 0 || cols == 0) { CRAS_ERROR_THROTTLE(1.0, "Received malformed RVL-encoded image. Size %ix%i contains zero.", cols, rows); - return {0, 0, CV_16UC1}; + return cv::Mat(0, 0, CV_16UC1); } // Sanity check - the best compression ratio is 4x; we leave some buffer, so we check whether the output image would @@ -389,7 +389,7 @@ cv::Mat CompressedDepthCodec::decodeRVL(const std::vector& compressed) if (numPixels > std::numeric_limits::max() || numPixels > static_cast(compressed.size()) * 5) { CRAS_ERROR_THROTTLE(1.0, "Received malformed RVL-encoded image. It reports size %ux%u.", cols, rows); - return {0, 0, CV_16UC1}; + return cv::Mat(0, 0, CV_16UC1); } cv::Mat decompressed(rows, cols, CV_16UC1);