From 702cf62ee386b6d240d9d4fcbb0ddeb33bb35c2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Wed, 3 Feb 2021 18:09:11 +0100 Subject: [PATCH] Declare some methods as const --- src/CodeInterpreter.hh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/CodeInterpreter.hh b/src/CodeInterpreter.hh index 80db32ae..a4acd54b 100644 --- a/src/CodeInterpreter.hh +++ b/src/CodeInterpreter.hh @@ -1652,18 +1652,18 @@ private: public: inline unsigned int - get_block_number() + get_block_number() const { return nb_blocks; }; size_t inline - get_begin_block(int block) + get_begin_block(int block) const { return begin_block[block]; } inline void * - get_current_code() + get_current_code() const { return code; }; @@ -1675,9 +1675,7 @@ public: streamoff Code_Size; CompiledCode.open(file_name + ".cod", std::ios::in | std::ios::binary| std::ios::ate); if (!CompiledCode.is_open()) - { - return tags_liste; - } + return tags_liste; Code_Size = CompiledCode.tellg(); CompiledCode.seekg(std::ios::beg); code = static_cast(mxMalloc(Code_Size));