From b0a7f82e96d42b00a27269ee2f38e3bdc984c10f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Heusipp?= Date: Fri, 15 Mar 2024 07:50:11 +0000 Subject: [PATCH] Merged revision(s) 20328 from trunk/OpenMPT: [Fix] Compile fix. ........ git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.31@20329 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 2fa52dfcd11..3e92cebf101 100644 --- a/src/mpt/io_read/filereader.hpp +++ b/src/mpt/io_read/filereader.hpp @@ -44,6 +44,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 @@ -100,13 +106,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(); }