diff options
author | Jacques Lucke <jacques@blender.org> | 2022-09-25 18:39:45 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-09-25 18:39:45 +0300 |
commit | c6e70e7bacf82b38ca7125d6821713a711489c0b (patch) | |
tree | 3679590f6254b7fbbd6623080edafe217f20c7b6 /source/blender/blenlib/BLI_map.hh | |
parent | 0419ee871ff960f62e28a2a9fed764f66c616d71 (diff) |
Cleanup: follow C++ type cast style guide in some files
https://wiki.blender.org/wiki/Style_Guide/C_Cpp#C.2B.2B_Type_Cast
This was discussed in https://devtalk.blender.org/t/rfc-style-guide-for-type-casts-in-c-code/25907.
Diffstat (limited to 'source/blender/blenlib/BLI_map.hh')
-rw-r--r-- | source/blender/blenlib/BLI_map.hh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenlib/BLI_map.hh b/source/blender/blenlib/BLI_map.hh index 95d1e344894..4322e3c0f2d 100644 --- a/source/blender/blenlib/BLI_map.hh +++ b/source/blender/blenlib/BLI_map.hh @@ -943,7 +943,7 @@ class Map { */ int64_t size_in_bytes() const { - return static_cast<int64_t>(sizeof(Slot) * slots_.size()); + return int64_t(sizeof(Slot) * slots_.size()); } /** @@ -987,7 +987,7 @@ class Map { max_load_factor_.compute_total_and_usable_slots( SlotArray::inline_buffer_capacity(), min_usable_slots, &total_slots, &usable_slots); BLI_assert(total_slots >= 1); - const uint64_t new_slot_mask = static_cast<uint64_t>(total_slots) - 1; + const uint64_t new_slot_mask = uint64_t(total_slots) - 1; /** * Optimize the case when the map was empty beforehand. We can avoid some copies here. @@ -1261,7 +1261,7 @@ template<typename Key, typename Value> class StdUnorderedMapWrapper { public: int64_t size() const { - return static_cast<int64_t>(map_.size()); + return int64_t(map_.size()); } bool is_empty() const |