diff --git a/include/bx/crtimpl.h b/include/bx/crtimpl.h index 55031fd..69e896e 100644 --- a/include/bx/crtimpl.h +++ b/include/bx/crtimpl.h @@ -22,7 +22,7 @@ namespace bx virtual ~DefaultAllocator(); /// - virtual void* realloc(void* _ptr, size_t _size, size_t _align, const char* _file, uint32_t _line) BX_OVERRIDE; + virtual void* realloc(void* _ptr, size_t _size, size_t _align, const char* _file, uint32_t _line) override; }; /// @@ -45,16 +45,16 @@ namespace bx virtual ~FileReader(); /// - virtual bool open(const FilePath& _filePath, Error* _err) BX_OVERRIDE; + virtual bool open(const FilePath& _filePath, Error* _err) override; /// - virtual void close() BX_OVERRIDE; + virtual void close() override; /// - virtual int64_t seek(int64_t _offset = 0, Whence::Enum _whence = Whence::Current) BX_OVERRIDE; + virtual int64_t seek(int64_t _offset = 0, Whence::Enum _whence = Whence::Current) override; /// - virtual int32_t read(void* _data, int32_t _size, Error* _err) BX_OVERRIDE; + virtual int32_t read(void* _data, int32_t _size, Error* _err) override; private: BX_ALIGN_DECL(16, uint8_t) m_internal[64]; @@ -71,16 +71,16 @@ namespace bx virtual ~FileWriter(); /// - virtual bool open(const FilePath& _filePath, bool _append, Error* _err) BX_OVERRIDE; + virtual bool open(const FilePath& _filePath, bool _append, Error* _err) override; /// - virtual void close() BX_OVERRIDE; + virtual void close() override; /// - virtual int64_t seek(int64_t _offset = 0, Whence::Enum _whence = Whence::Current) BX_OVERRIDE; + virtual int64_t seek(int64_t _offset = 0, Whence::Enum _whence = Whence::Current) override; /// - virtual int32_t write(const void* _data, int32_t _size, Error* _err) BX_OVERRIDE; + virtual int32_t write(const void* _data, int32_t _size, Error* _err) override; private: BX_ALIGN_DECL(16, uint8_t) m_internal[64]; @@ -100,13 +100,13 @@ namespace bx ~ProcessReader(); /// - virtual bool open(const FilePath& _filePath, const StringView& _args, Error* _err) BX_OVERRIDE; + virtual bool open(const FilePath& _filePath, const StringView& _args, Error* _err) override; /// - virtual void close() BX_OVERRIDE; + virtual void close() override; /// - virtual int32_t read(void* _data, int32_t _size, Error* _err) BX_OVERRIDE; + virtual int32_t read(void* _data, int32_t _size, Error* _err) override; /// int32_t getExitCode() const; @@ -130,13 +130,13 @@ namespace bx ~ProcessWriter(); /// - virtual bool open(const FilePath& _filePath, const StringView& _args, Error* _err) BX_OVERRIDE; + virtual bool open(const FilePath& _filePath, const StringView& _args, Error* _err) override; /// - virtual void close() BX_OVERRIDE; + virtual void close() override; /// - virtual int32_t write(const void* _data, int32_t _size, Error* _err) BX_OVERRIDE; + virtual int32_t write(const void* _data, int32_t _size, Error* _err) override; /// int32_t getExitCode() const; diff --git a/include/bx/macros.h b/include/bx/macros.h index c383848..48cf819 100644 --- a/include/bx/macros.h +++ b/include/bx/macros.h @@ -76,7 +76,6 @@ # define BX_FALLTHROUGH BX_NOOP() # endif // BX_COMPILER_GCC >= 70000 # define BX_NO_VTABLE -# define BX_OVERRIDE override # define BX_PRINTF_ARGS(_format, _args) __attribute__( (format(__printf__, _format, _args) ) ) # if BX_CLANG_HAS_FEATURE(cxx_thread_local) # define BX_THREAD_LOCAL __thread @@ -99,7 +98,6 @@ # define BX_NO_RETURN # define BX_FALLTHROUGH BX_NOOP() # define BX_NO_VTABLE __declspec(novtable) -# define BX_OVERRIDE override # define BX_PRINTF_ARGS(_format, _args) # define BX_THREAD_LOCAL __declspec(thread) # define BX_ATTRIBUTE(_x) diff --git a/include/bx/readerwriter.h b/include/bx/readerwriter.h index 1f222a4..c5a8be3 100644 --- a/include/bx/readerwriter.h +++ b/include/bx/readerwriter.h @@ -121,7 +121,7 @@ namespace bx virtual void* more(uint32_t _size = 0); /// - virtual uint32_t getSize() BX_OVERRIDE; + virtual uint32_t getSize() override; private: void* m_data; @@ -139,10 +139,10 @@ namespace bx virtual ~MemoryBlock(); /// - virtual void* more(uint32_t _size = 0) BX_OVERRIDE; + virtual void* more(uint32_t _size = 0) override; /// - virtual uint32_t getSize() BX_OVERRIDE; + virtual uint32_t getSize() override; private: AllocatorI* m_allocator; @@ -161,10 +161,10 @@ namespace bx virtual ~SizerWriter(); /// - virtual int64_t seek(int64_t _offset = 0, Whence::Enum _whence = Whence::Current) BX_OVERRIDE; + virtual int64_t seek(int64_t _offset = 0, Whence::Enum _whence = Whence::Current) override; /// - virtual int32_t write(const void* /*_data*/, int32_t _size, Error* _err) BX_OVERRIDE; + virtual int32_t write(const void* /*_data*/, int32_t _size, Error* _err) override; private: int64_t m_pos; @@ -182,10 +182,10 @@ namespace bx virtual ~MemoryReader(); /// - virtual int64_t seek(int64_t _offset, Whence::Enum _whence) BX_OVERRIDE; + virtual int64_t seek(int64_t _offset, Whence::Enum _whence) override; /// - virtual int32_t read(void* _data, int32_t _size, Error* _err) BX_OVERRIDE; + virtual int32_t read(void* _data, int32_t _size, Error* _err) override; /// const uint8_t* getDataPtr() const; @@ -213,10 +213,10 @@ namespace bx virtual ~MemoryWriter(); /// - virtual int64_t seek(int64_t _offset = 0, Whence::Enum _whence = Whence::Current) BX_OVERRIDE; + virtual int64_t seek(int64_t _offset = 0, Whence::Enum _whence = Whence::Current) override; /// - virtual int32_t write(const void* _data, int32_t _size, Error* _err) BX_OVERRIDE; + virtual int32_t write(const void* _data, int32_t _size, Error* _err) override; private: MemoryBlockI* m_memBlock; diff --git a/src/crtimpl.cpp b/src/crtimpl.cpp index 4b1e5a4..c5f3f93 100644 --- a/src/crtimpl.cpp +++ b/src/crtimpl.cpp @@ -116,7 +116,7 @@ namespace bx close(); } - virtual bool open(const FilePath& _filePath, Error* _err) BX_OVERRIDE + virtual bool open(const FilePath& _filePath, Error* _err) override { BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); @@ -137,7 +137,7 @@ namespace bx return true; } - virtual void close() BX_OVERRIDE + virtual void close() override { if (m_open && NULL != m_file) @@ -147,14 +147,14 @@ namespace bx } } - virtual int64_t seek(int64_t _offset, Whence::Enum _whence) BX_OVERRIDE + virtual int64_t seek(int64_t _offset, Whence::Enum _whence) override { BX_CHECK(NULL != m_file, "Reader/Writer file is not open."); fseeko64(m_file, _offset, _whence); return ftello64(m_file); } - virtual int32_t read(void* _data, int32_t _size, Error* _err) BX_OVERRIDE + virtual int32_t read(void* _data, int32_t _size, Error* _err) override { BX_CHECK(NULL != m_file, "Reader/Writer file is not open."); BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); @@ -196,7 +196,7 @@ namespace bx close(); } - virtual bool open(const FilePath& _filePath, bool _append, Error* _err) BX_OVERRIDE + virtual bool open(const FilePath& _filePath, bool _append, Error* _err) override { BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); @@ -218,7 +218,7 @@ namespace bx return true; } - virtual void close() BX_OVERRIDE + virtual void close() override { if (m_open && NULL != m_file) @@ -228,14 +228,14 @@ namespace bx } } - virtual int64_t seek(int64_t _offset, Whence::Enum _whence) BX_OVERRIDE + virtual int64_t seek(int64_t _offset, Whence::Enum _whence) override { BX_CHECK(NULL != m_file, "Reader/Writer file is not open."); fseeko64(m_file, _offset, _whence); return ftello64(m_file); } - virtual int32_t write(const void* _data, int32_t _size, Error* _err) BX_OVERRIDE + virtual int32_t write(const void* _data, int32_t _size, Error* _err) override { BX_CHECK(NULL != m_file, "Reader/Writer file is not open."); BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); @@ -269,23 +269,23 @@ namespace bx close(); } - virtual bool open(const FilePath& _filePath, Error* _err) BX_OVERRIDE + virtual bool open(const FilePath& _filePath, Error* _err) override { BX_UNUSED(_filePath, _err); return false; } - virtual void close() BX_OVERRIDE + virtual void close() override { } - virtual int64_t seek(int64_t _offset, Whence::Enum _whence) BX_OVERRIDE + virtual int64_t seek(int64_t _offset, Whence::Enum _whence) override { BX_UNUSED(_offset, _whence); return 0; } - virtual int32_t read(void* _data, int32_t _size, Error* _err) BX_OVERRIDE + virtual int32_t read(void* _data, int32_t _size, Error* _err) override { BX_UNUSED(_data, _size, _err); return 0; @@ -304,23 +304,23 @@ namespace bx close(); } - virtual bool open(const FilePath& _filePath, bool _append, Error* _err) BX_OVERRIDE + virtual bool open(const FilePath& _filePath, bool _append, Error* _err) override { BX_UNUSED(_filePath, _append); return false; } - virtual void close() BX_OVERRIDE + virtual void close() override { } - virtual int64_t seek(int64_t _offset, Whence::Enum _whence) BX_OVERRIDE + virtual int64_t seek(int64_t _offset, Whence::Enum _whence) override { BX_UNUSED(_offset, _whence); return 0; } - virtual int32_t write(const void* _data, int32_t _size, Error* _err) BX_OVERRIDE + virtual int32_t write(const void* _data, int32_t _size, Error* _err) override { BX_UNUSED(_data, _size, _err); return 0; diff --git a/src/debug.cpp b/src/debug.cpp index e2c3d43..889a16c 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -149,7 +149,7 @@ namespace bx class DebugWriter : public WriterI { - virtual int32_t write(const void* _data, int32_t _size, Error* _err) BX_OVERRIDE + virtual int32_t write(const void* _data, int32_t _size, Error* _err) override { BX_UNUSED(_err); diff --git a/tools/bin2c/bin2c.cpp b/tools/bin2c/bin2c.cpp index db52fae..244b309 100644 --- a/tools/bin2c/bin2c.cpp +++ b/tools/bin2c/bin2c.cpp @@ -23,7 +23,7 @@ public: { } - virtual int32_t write(const void* _data, int32_t _size, bx::Error* /*_err*/ = NULL) BX_OVERRIDE + virtual int32_t write(const void* _data, int32_t _size, bx::Error* /*_err*/ = NULL) override { const char* data = (const char*)_data; m_buffer.insert(m_buffer.end(), data, data+_size);