diff --git a/README.md b/README.md index 00810181..d444165b 100644 --- a/README.md +++ b/README.md @@ -793,6 +793,8 @@ Access to the bmff code is guarded in two ways. Firstly, you have to build the EXIV2API bool enableBMFF(bool enable); ``` +The return value of `enableBMFF()` reports the build status of bmff support. A return value of true indicates that the library has been built with bmff support. + Applications may wish the provide a preference setting to enable bmff support and thereby place the responsibility for the use of this code with the user of the application. It is recommended that you enclose the call to `enableBMFF()` with the compile time macro EXIV2\_TEST\_VERSION to ensure that your code builds cleanly on earlier versions of Exiv2. It is recommended that you call enableBMFF() at process start-up as it is not threadsafe. A code snippet is provided in [2.14 Thread Safety](#2-14). diff --git a/src/bmffimage.cpp b/src/bmffimage.cpp index 30aa4c62..1ec511ae 100644 --- a/src/bmffimage.cpp +++ b/src/bmffimage.cpp @@ -84,9 +84,10 @@ namespace Exiv2 #ifdef EXV_ENABLE_BMFF enabled = enable; return true; +#else + UNUSED(enable); + return false; #endif // EXV_ENABLE_BMFF - enable = false; // unused - return enable; } std::string Iloc::toString() const @@ -172,7 +173,7 @@ namespace Exiv2 return result; } - long BmffImage::boxHandler(std::ostream& out, Exiv2::PrintStructureOption option,int depth) + long BmffImage::boxHandler(std::ostream& out /* = std::cout*/ , Exiv2::PrintStructureOption option /* = kpsNone */,int depth /* =0 */) { long result = (long)io_->size(); long address = (long)io_->tell();