@@ -196,7 +196,7 @@ int TDBStore::erase_erase_unit(uint8_t area, uint32_t offset)
196
196
void TDBStore::calc_area_params ()
197
197
{
198
198
// TDBStore can't exceed 32 bits
199
- bd_size_t bd_size = std::min (_bd->size (), ( bd_size_t ) 0x80000000L );
199
+ bd_size_t bd_size = std::min< bd_size_t > (_bd->size (), 0x80000000L );
200
200
201
201
memset (_area_params, 0 , sizeof (_area_params));
202
202
size_t area_0_size = 0 ;
@@ -293,7 +293,7 @@ int TDBStore::read_record(uint8_t area, uint32_t offset, char *key,
293
293
return MBED_ERROR_INVALID_SIZE;
294
294
}
295
295
296
- actual_data_size = std::min (( size_t ) data_buf_size, ( size_t ) data_size - data_offset);
296
+ actual_data_size = std::min< size_t >( data_buf_size, data_size - data_offset);
297
297
298
298
if (copy_data && actual_data_size && !data_buf) {
299
299
return MBED_ERROR_INVALID_ARGUMENT;
@@ -327,7 +327,7 @@ int TDBStore::read_record(uint8_t area, uint32_t offset, char *key,
327
327
user_key_ptr[key_size] = ' \0 ' ;
328
328
} else {
329
329
dest_buf = _work_buf;
330
- chunk_size = std::min (key_size, _work_buf_size);
330
+ chunk_size = std::min< size_t > (key_size, _work_buf_size);
331
331
}
332
332
} else {
333
333
// This means that we're on the data part
@@ -860,7 +860,7 @@ int TDBStore::copy_record(uint8_t from_area, uint32_t from_offset, uint32_t to_o
860
860
total_size -= chunk_size;
861
861
862
862
while (total_size) {
863
- chunk_size = std::min (total_size, _work_buf_size);
863
+ chunk_size = std::min< size_t > (total_size, _work_buf_size);
864
864
ret = read_area (from_area, from_offset, chunk_size, _work_buf);
865
865
if (ret) {
866
866
return ret;
0 commit comments