diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-14 12:55:25 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-15 12:56:09 +0200 |
commit | 6c46fdd75de8cec4f62f9fed02212a2d1e0b71b5 (patch) | |
tree | 4e1a3c1ebfc9d9b87dbc0810827686df4192c1f8 /sc | |
parent | 22de481db334fcce404cdcf88183cd544cd19271 (diff) |
new pahole-all-classes script, and update a couple of sc/ structs
Create a new script to scan our codebase for holes in our
structures.
Implemented a couple of the things I found
ScSortKeyState 12bytes -> 8bytes
sc::MultiDataCellState 12bytes -> 8bytes
Change-Id: I139dda36aedf02b7f19be121eb312e5552142b87
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/sortparam.hxx | 2 | ||||
-rw-r--r-- | sc/inc/types.hxx | 7 | ||||
-rw-r--r-- | sc/source/core/data/types.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/dbgui/tpsort.cxx | 2 |
4 files changed, 7 insertions, 10 deletions
diff --git a/sc/inc/sortparam.hxx b/sc/inc/sortparam.hxx index 6eba07e64487..58f6b38e7db1 100644 --- a/sc/inc/sortparam.hxx +++ b/sc/inc/sortparam.hxx @@ -33,8 +33,8 @@ struct ScQueryParam; struct ScSortKeyState { - bool bDoSort; SCCOLROW nField; + bool bDoSort; bool bAscending; }; diff --git a/sc/inc/types.hxx b/sc/inc/types.hxx index 2cfcb00eab21..c4e62ae63452 100644 --- a/sc/inc/types.hxx +++ b/sc/inc/types.hxx @@ -97,12 +97,11 @@ struct RangeMatrix struct MultiDataCellState { - enum StateType { Invalid = 0, Empty, HasOneCell, HasMultipleCells }; + enum StateType : sal_uInt8 { Invalid = 0, Empty, HasOneCell, HasMultipleCells }; - StateType meState; - - SCCOL mnCol1; //< first non-empty column SCROW mnRow1; //< first non-empty row + SCCOL mnCol1; //< first non-empty column + StateType meState; MultiDataCellState(); MultiDataCellState( StateType eState ); diff --git a/sc/source/core/data/types.cxx b/sc/source/core/data/types.cxx index 919a7e62fee4..e5f97c92daf2 100644 --- a/sc/source/core/data/types.cxx +++ b/sc/source/core/data/types.cxx @@ -23,11 +23,9 @@ bool RangeMatrix::isRangeValid() const } MultiDataCellState::MultiDataCellState() : - meState(StateType::Invalid), - mnCol1(-1), mnRow1(-1) {} + mnRow1(-1), mnCol1(-1), meState(StateType::Invalid) {} MultiDataCellState::MultiDataCellState( StateType eState ) : - meState(eState), - mnCol1(-1), mnRow1(-1) {} + mnRow1(-1), mnCol1(-1), meState(eState) {} } diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 2fa7ad90747d..9b6c72ecdb22 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -404,7 +404,7 @@ sal_uInt16 ScTabPageSortFields::GetFieldSelPos( SCCOLROW nField ) void ScTabPageSortFields::SetLastSortKey( sal_uInt16 nItem ) { // Extend local SortParam copy - const ScSortKeyState atempKeyState = { false, 0, true }; + const ScSortKeyState atempKeyState = { 0, false, true }; aSortData.maKeyState.push_back( atempKeyState ); // Add Sort Key Item |