Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Typo.
  • Loading branch information
chinmaygarde committed Jul 3, 2024
commit dbbc7353279fe49bc78d83850d0a1d8d1b29da1a
8 changes: 4 additions & 4 deletions impeller/base/allocation_size.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ enum class FromBytesTag { kFromBytes };
/// @brief Represents the size of an allocation in different units.
///
/// Refer to the typedefs for Bytes, KiloBytes, MegaBytes,
/// Gigabytes, KibiBytes, MebiBytes, and GigiBytes below when using.
/// Gigabytes, KibiBytes, MebiBytes, and GibiBytes below when using.
///
/// Storage and all operations are always on unsigned units of
/// bytes.
Expand Down Expand Up @@ -147,7 +147,7 @@ using GigaBytes = AllocationSize<1'000u * 1'000u * 1'000u>;

using KibiBytes = AllocationSize<1'024u>;
using MebiBytes = AllocationSize<1'024u * 1'024u>;
using GigiBytes = AllocationSize<1'024u * 1'024u * 1'024u>;
using GibiBytes = AllocationSize<1'024u * 1'024u * 1'024u>;

inline namespace allocation_size_literals {

Expand Down Expand Up @@ -175,8 +175,8 @@ constexpr MebiBytes operator"" _mib(unsigned long long size) {
return MebiBytes{static_cast<double>(size)};
}

constexpr GigiBytes operator"" _gib(unsigned long long size) {
return GigiBytes{static_cast<double>(size)};
constexpr GibiBytes operator"" _gib(unsigned long long size) {
return GibiBytes{static_cast<double>(size)};
}

} // namespace allocation_size_literals
Expand Down
2 changes: 1 addition & 1 deletion impeller/base/allocation_size_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ TEST(AllocationSizeTest, CanCreateTypedAllocations) {
auto mebibytes = MebiBytes{1};
ASSERT_EQ(mebibytes.GetByteSize(), 1048576u);

auto gigibytes = GigiBytes{1};
auto gigibytes = GibiBytes{1};
ASSERT_EQ(gigibytes.GetByteSize(), 1073741824u);
}

Expand Down