From 56ccf781eba1b79c5b3fe1f5bd92aab89df92f6f Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Sat, 13 Feb 2016 15:26:16 +0100 Subject: [PATCH] Fix compiler warning on GCC 4.8 --- src/blockstore/implementations/ondisk/OnDiskBlock.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/blockstore/implementations/ondisk/OnDiskBlock.cpp b/src/blockstore/implementations/ondisk/OnDiskBlock.cpp index cb78e4b3..36dbd390 100644 --- a/src/blockstore/implementations/ondisk/OnDiskBlock.cpp +++ b/src/blockstore/implementations/ondisk/OnDiskBlock.cpp @@ -112,7 +112,8 @@ optional OnDiskBlock::_loadFromDisk(const bf::path &filepath) { } _checkHeader(&file); Data result = Data::LoadFromStream(file); - return result; + //TODO With newer compilers, "return result;" would be enough + return boost::optional(std::move(result)); } void OnDiskBlock::_checkHeader(istream *str) {