Skip to content

Commit aabeb8c

Browse files
committed
Fixed const attribute mismatch on size function
1 parent 58c52d3 commit aabeb8c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

features/filesystem/sd/SDBlockDevice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ bd_size_t SDBlockDevice::get_erase_size() const
341341
return 512;
342342
}
343343

344-
bd_size_t SDBlockDevice::size()
344+
bd_size_t SDBlockDevice::size() const
345345
{
346346
_lock.lock();
347347
bd_size_t sectors = _sectors;

features/filesystem/sd/SDBlockDevice.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class SDBlockDevice : public BlockDevice {
119119
*
120120
* @return Size of the underlying device in bytes
121121
*/
122-
virtual bd_size_t size();
122+
virtual bd_size_t size() const;
123123

124124
/** Enable or disable debugging
125125
*
@@ -149,7 +149,7 @@ class SDBlockDevice : public BlockDevice {
149149
unsigned _block_size;
150150
bool _is_initialized;
151151
bool _dbg;
152-
Mutex _lock;
152+
mutable Mutex _lock;
153153
};
154154

155155

0 commit comments

Comments
 (0)