Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 4cf9136

Browse files
authored
Fix DataTargetReader::AlignBase() (#28072)
DAC_ALIGNAS macro was used to force MSVC and clang/gcc compilers layouts to match. Update DataTargetReader::AlignBase() assumptions based on new layouts
1 parent 8291bb8 commit 4cf9136

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/md/datasource/datatargetreader.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,10 @@ void DataTargetReader::Align(DWORD alignmentBytes)
163163

164164
void DataTargetReader::AlignBase()
165165
{
166-
#ifdef _MSC_VER
167-
// Windows MSVC compiler aligns structs based on the largest field size
166+
// Align structs based on the largest field size
167+
// This is the default for MSVC compilers
168+
// This is forced on other platforms by the DAC_ALIGNAS macro
168169
Align(m_currentStructureAlign);
169-
#else
170-
// clang (on all platforms) aligns structs always on 4 byte boundaries
171-
Align(4);
172-
#endif
173170
}
174171

175172
HRESULT DataTargetReader::GetRemotePointerSize(ULONG32* pPointerSize)

0 commit comments

Comments
 (0)