diff --git a/vrs/FileDelegator.h b/vrs/FileDelegator.h index fb1f10f4..f2a226dd 100644 --- a/vrs/FileDelegator.h +++ b/vrs/FileDelegator.h @@ -16,17 +16,11 @@ #pragma once -#include - -#include -#include #include -#include -#include -#include #include #include +#include namespace vrs { @@ -57,8 +51,7 @@ class FileDelegator { /// @return A status code, 0 on success, which doesn't necessarily mean that the file/object /// exists or can be opened, merely, that parsing the URI did not fail. /// On success, any of the fields may have been set or changed, including fileHandlerName and URI. - virtual int parseUri(FileSpec& inOutFileSpec, size_t colonIndex) const { - (void)colonIndex; + virtual int parseUri(FileSpec& inOutFileSpec, MAYBE_UNUSED size_t colonIndex) const { return inOutFileSpec.parseUri(); } }; diff --git a/vrs/FileHandler.h b/vrs/FileHandler.h index 845f273c..e5910f7a 100644 --- a/vrs/FileHandler.h +++ b/vrs/FileHandler.h @@ -20,7 +20,6 @@ #include #include -#include #include #include #include @@ -28,6 +27,7 @@ #include #include #include +#include namespace vrs { @@ -135,8 +135,7 @@ class FileHandler : public FileDelegator { /// Check if a number of bytes are available for immediate return (e.g. on disk or in-cache) /// @param length: the number of bytes to check availability of. /// @return true if available, false if unavailable (e.g. requiring a network fetch) - virtual bool isAvailableOrPrefetch(size_t length) { - (void)length; + virtual bool isAvailableOrPrefetch(MAYBE_UNUSED size_t length) { return !isRemoteFileSystem(); } /// Read a number of bytes, in a chunk aware way. @@ -210,10 +209,8 @@ class FileHandler : public FileDelegator { /// caching starts. /// @return True if the file handler support custom read sequences. virtual bool prefetchReadSequence( - const vector>& sequence, - bool clearSequence = true) { - (void)sequence; - (void)clearSequence; + MAYBE_UNUSED const vector>& sequence, + MAYBE_UNUSED bool clearSequence = true) { return false; }