From 1241a5447ac2b3615e2d5cbe1378969b545fd16f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Heusipp?= Date: Fri, 15 Mar 2024 07:49:40 +0000 Subject: [PATCH] [Fix] Compile fix. git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@20328 56274372-70c3-4bfc-bfc3-4c3a0b034d27 --- src/mpt/io_read/filereader.hpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mpt/io_read/filereader.hpp b/src/mpt/io_read/filereader.hpp index e15c31377bd..251e039defb 100644 --- a/src/mpt/io_read/filereader.hpp +++ b/src/mpt/io_read/filereader.hpp @@ -45,6 +45,12 @@ namespace FileReader { +// change to show warnings for functions which trigger pre-caching the whole file for unseekable streams +//#define MPT_FILEREADER_DEPRECATED [[deprecated]] +#define MPT_FILEREADER_DEPRECATED + + + // TFileCursor members begin template @@ -101,13 +107,13 @@ bool HasFastGetLength(const TFileCursor & f) { // Returns size of the mapped file in bytes. template -MPT_FILECURSOR_DEPRECATED typename TFileCursor::pos_type GetLength(const TFileCursor & f) { +MPT_FILEREADER_DEPRECATED typename TFileCursor::pos_type GetLength(const TFileCursor & f) { return f.GetLength(); } // Return byte count between cursor position and end of file, i.e. how many bytes can still be read. template -MPT_FILECURSOR_DEPRECATED typename TFileCursor::pos_type BytesLeft(const TFileCursor & f) { +MPT_FILEREADER_DEPRECATED typename TFileCursor::pos_type BytesLeft(const TFileCursor & f) { return f.BytesLeft(); }