Declare some methods as const

issue#70
Sébastien Villemot 2021-02-03 18:09:11 +01:00
parent 234fcd1d2b
commit 702cf62ee3
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 4 additions and 6 deletions

View File

@ -1652,18 +1652,18 @@ private:
public: public:
inline unsigned int inline unsigned int
get_block_number() get_block_number() const
{ {
return nb_blocks; return nb_blocks;
}; };
size_t inline size_t inline
get_begin_block(int block) get_begin_block(int block) const
{ {
return begin_block[block]; return begin_block[block];
} }
inline void * inline void *
get_current_code() get_current_code() const
{ {
return code; return code;
}; };
@ -1675,9 +1675,7 @@ public:
streamoff Code_Size; streamoff Code_Size;
CompiledCode.open(file_name + ".cod", std::ios::in | std::ios::binary| std::ios::ate); CompiledCode.open(file_name + ".cod", std::ios::in | std::ios::binary| std::ios::ate);
if (!CompiledCode.is_open()) if (!CompiledCode.is_open())
{ return tags_liste;
return tags_liste;
}
Code_Size = CompiledCode.tellg(); Code_Size = CompiledCode.tellg();
CompiledCode.seekg(std::ios::beg); CompiledCode.seekg(std::ios::beg);
code = static_cast<uint8_t *>(mxMalloc(Code_Size)); code = static_cast<uint8_t *>(mxMalloc(Code_Size));