[Libreoffice-commits] core.git: sw/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Wed Nov 18 15:47:50 UTC 2020
sw/source/core/layout/legacyitem.cxx | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
New commits:
commit 179812eff88b85f34cb85eaa9b9ad027cb6a979c
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Wed Nov 18 08:53:01 2020 +0100
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Wed Nov 18 16:47:09 2020 +0100
This doesn't depend on SAL_TYPES_SIZEOFLONG anymore
Change-Id: I0848a30073613df32da9321def0662272f03f61b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105996
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/sw/source/core/layout/legacyitem.cxx b/sw/source/core/layout/legacyitem.cxx
index 932afa918550..281b71d83bc7 100644
--- a/sw/source/core/layout/legacyitem.cxx
+++ b/sw/source/core/layout/legacyitem.cxx
@@ -66,11 +66,10 @@ namespace legacy::SwFormatVert
SvStream& Store(const SwFormatVertOrient& rItem, SvStream& rStrm, sal_uInt16)
{
-#if SAL_TYPES_SIZEOFLONG == 8
- rStrm.WriteInt64(rItem.GetPos());
-#else
- rStrm.WriteInt32(rItem.GetPos());
-#endif
+ if constexpr(sizeof(rItem.GetPos()) >= 8)
+ rStrm.WriteInt64(rItem.GetPos());
+ else
+ rStrm.WriteInt32(rItem.GetPos());
rStrm.WriteInt16(rItem.GetVertOrient()).WriteInt16(rItem.GetRelationOrient());
return rStrm;
}
More information about the Libreoffice-commits
mailing list