Utils: Rename hasAllocated in isReference

HasAllocated it misleading because it means that it has read only
references too. Maybe isPointing would be good too but so it is more
orthogonal to isReadOnlyReference.

Change-Id: I79aaa271aa302de2500c2ea81614e433d76f74ec
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Marco Bubke
2016-02-22 12:03:59 +01:00
parent e562af2c29
commit 6315bd5de2
3 changed files with 9 additions and 9 deletions

View File

@@ -63,7 +63,7 @@ struct AllocatedLayout {
char dummy[maximumShortStringDataAreaSize - sizeof(Data)];
std::uint8_t shortStringSize: 6;
std::uint8_t isReadOnlyReference : 1;
std::uint8_t hasAllocated : 1;
std::uint8_t isReference : 1;
};
struct ReferenceLayout {
@@ -75,14 +75,14 @@ struct ReferenceLayout {
char dummy[maximumShortStringDataAreaSize - sizeof(Data)];
std::uint8_t shortStringSize: 6;
std::uint8_t isReadOnlyReference : 1;
std::uint8_t hasAllocated : 1;
std::uint8_t isReference : 1;
};
struct ShortStringLayout {
char string[maximumShortStringDataAreaSize];
std::uint8_t shortStringSize: 6;
std::uint8_t isReadOnlyReference : 1;
std::uint8_t hasAllocated : 1;
std::uint8_t isReference : 1;
};
struct ALIGNAS_16 StringDataLayout {
@@ -111,14 +111,14 @@ struct ALIGNAS_16 StringDataLayout {
shortString.shortStringSize = std::uint8_t(Size) - 1;
#pragma GCC diagnostic pop
#endif
shortString.hasAllocated = false;
shortString.isReference = false;
shortString.isReadOnlyReference = false;
} else {
reference.data.pointer = string;
reference.data.size = Size - 1;
reference.data.capacity = 0;
reference.shortStringSize = 0;
reference.hasAllocated = true;
reference.isReference = true;
reference.isReadOnlyReference = true;
}
#endif