diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2022-02-04 16:22:47 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2022-02-07 18:58:25 +0100 |
commit | c24b04707c5b914bda22d709c2da025c784f5045 (patch) | |
tree | 95f60ebac90efbce53b93852e29c9a3fbcd04f2c /sc | |
parent | 24e6217c0abdaed703a077e77881ad6e8b4f6f0e (diff) |
remove pointless BCA_SLOTS_ROW assertions
This is now only used for assertions, but otherwise it's actually
not used at all. This code is apparently remnants of original
slots code, which just distributed them linearly in slices. Then
b3579d71c6536ab1d03 increased sheet size limits and optionally made
the distribution logarithmic, and then de7e83969b60ab6d78e501
removed the linear case but didn't remove these assertions.
Change-Id: I6c5a74aa4e060552da3ad1dcc6bbaa21c831a4bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129496
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/bcaslot.cxx | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx index eb4405cb132f..6a07ee96111b 100644 --- a/sc/source/core/data/bcaslot.cxx +++ b/sc/source/core/data/bcaslot.cxx @@ -39,25 +39,8 @@ // must be integer divisors of MAXCOLCOUNT respectively MAXROWCOUNT constexpr SCCOL BCA_SLOTS_COL = MAXCOLCOUNT / 16; constexpr SCCOL BCA_SLOT_COLS = MAXCOLCOUNT / BCA_SLOTS_COL; -#if !defined NDEBUG -constexpr SCROW BCA_SLICE = 128; -static SCROW BCA_SLOTS_ROW(const ScSheetLimits& rLimits) { return rLimits.GetMaxRowCount() / BCA_SLICE; } -static SCROW BCA_SLOT_ROWS(const ScSheetLimits& rLimits) -{ - auto nMaxRowCount = rLimits.GetMaxRowCount(); - auto nSlotsRow = BCA_SLOTS_ROW(rLimits); - assert((nMaxRowCount / nSlotsRow * nSlotsRow) == nMaxRowCount && "bad BCA_SLOTS_ROW value"); - return nMaxRowCount / nSlotsRow; -} -#endif -// multiple? static_assert((BCA_SLOT_COLS * BCA_SLOTS_COL) == MAXCOLCOUNT, "bad BCA_SLOTS_COL value"); -// size of slot array if linear -#if !defined NDEBUG -static int BCA_SLOTS(const ScSheetLimits& rLimits) { return BCA_SLOTS_COL * BCA_SLOTS_ROW(rLimits); } -#endif - ScBroadcastArea::ScBroadcastArea( const ScRange& rRange ) : pUpdateChainNext(nullptr), aRange(rRange), @@ -592,13 +575,6 @@ ScBroadcastAreaSlotMachine::ScBroadcastAreaSlotMachine( nInBulkBroadcast( 0 ) { const ScSheetLimits& rSheetLimits = pDoc->GetSheetLimits(); - - assert((BCA_SLOT_ROWS(rSheetLimits) * BCA_SLOTS_ROW(rSheetLimits)) == pDoc->GetSheetLimits().GetMaxRowCount() && "bad BCA_SLOTS_ROW value"); - // 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... - assert(BCA_SLOTS(rSheetLimits) <= 268435456 && "DOOMed"); - // initSlotDistribution --------- // Logarithmic or any other distribution. // Upper sheet part usually is more populated and referenced and gets fine |