[Libreoffice-commits] core.git: sc/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Wed Nov 13 12:01:16 UTC 2019
sc/source/core/data/bcaslot.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 5f0d6df7f57ae281fe161e61c7f25d67453fddd2
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Nov 13 10:50:30 2019 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Nov 13 13:00:34 2019 +0100
Use two-argument form of static_assert
Change-Id: I2f2c78668f37f2d7474bf0e9d0b084bf2223a81d
Reviewed-on: https://gerrit.libreoffice.org/82577
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index 614145b7bc06..c904ad716bd1 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -43,15 +43,15 @@ constexpr SCROW BCA_SLOTS_ROW = MAXROWCOUNT / BCA_SLICE;
constexpr SCCOL BCA_SLOT_COLS = MAXCOLCOUNT / BCA_SLOTS_COL;
constexpr SCROW BCA_SLOT_ROWS = MAXROWCOUNT / BCA_SLOTS_ROW;
// multiple?
-static_assert((BCA_SLOT_COLS * BCA_SLOTS_COL) == MAXCOLCOUNT && "bad BCA_SLOTS_COL value");
-static_assert((BCA_SLOT_ROWS * BCA_SLOTS_ROW) == MAXROWCOUNT && "bad BCA_SLOTS_ROW value");
+static_assert((BCA_SLOT_COLS * BCA_SLOTS_COL) == MAXCOLCOUNT, "bad BCA_SLOTS_COL value");
+static_assert((BCA_SLOT_ROWS * BCA_SLOTS_ROW) == MAXROWCOUNT, "bad BCA_SLOTS_ROW value");
// size of slot array if linear
constexpr int BCA_SLOTS = BCA_SLOTS_COL * BCA_SLOTS_ROW;
// Arbitrary 2**31/8, assuming size_t can hold at least 2^31 values and
// sizeof_ptr is at most 8 bytes. You'd probably doom your machine's memory
// anyway, once you reached these values...
-static_assert(BCA_SLOTS <= 268435456 && "DOOMed");
+static_assert(BCA_SLOTS <= 268435456, "DOOMed");
struct ScSlotData
{
More information about the Libreoffice-commits
mailing list