forked from qt-creator/qt-creator
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user