summaryrefslogtreecommitdiff
path: root/rsc/inc/rscrange.hxx
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2016-08-31 14:14:50 +0200
committerJochen Nitschke <j.nitschke+logerrit@ok.de>2016-08-31 16:34:15 +0000
commitf322c52b89f514b792179c4d7e6ee2c3aa893a4e (patch)
tree0abd175058dd939b1cb0379c4dd4a9355c2d7997 /rsc/inc/rscrange.hxx
parent2a1431208e4292e8563935f5e8cd0107113f65ea (diff)
use initializer list ctors for res types
make nSize and nOffInstData const, let Size() return fixed sizes Change-Id: I7e2792e1cd990e65582020353054087f94856151 Reviewed-on: https://gerrit.libreoffice.org/28545 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Diffstat (limited to 'rsc/inc/rscrange.hxx')
-rw-r--r--rsc/inc/rscrange.hxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/rsc/inc/rscrange.hxx b/rsc/inc/rscrange.hxx
index bbcd8a736649..aee604bcc7d5 100644
--- a/rsc/inc/rscrange.hxx
+++ b/rsc/inc/rscrange.hxx
@@ -34,7 +34,6 @@ protected:
};
sal_Int32 nMin; // range minimum value
sal_Int32 nMax; // range maximum value
- sal_uInt32 nSize;
public:
RscRange( Atom nId, sal_uInt32 nTypId );
virtual RSCCLASS_TYPE GetClassType() const override;
@@ -42,7 +41,7 @@ public:
// sets the allowed range
void SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum );
// returns the class size in bytes
- sal_uInt32 Size() override { return nSize; }
+ sal_uInt32 Size() const override { return ALIGNED_SIZE(sizeof(RscRangeInst)); }
// an assignment to a variable
virtual void SetToDefault( const RSCINST & rInst ) override
{
@@ -72,7 +71,6 @@ protected:
};
sal_Int32 nMin; // range minimum value
sal_Int32 nMax; // range maximum value
- sal_uInt32 nSize;
public:
RscLongRange( Atom nId, sal_uInt32 nTypId );
virtual RSCCLASS_TYPE GetClassType() const override;
@@ -80,7 +78,7 @@ public:
// sets the allowed range
void SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum );
// returns the class size in bytes
- sal_uInt32 Size() override { return nSize; }
+ sal_uInt32 Size() const override { return ALIGNED_SIZE(sizeof(RscLongRangeInst)); }
// an assignment to a variable
virtual void SetToDefault( const RSCINST & rInst ) override
{
@@ -112,7 +110,6 @@ public:
class RscIdRange : public RscTop
{
- sal_uInt32 nSize;
protected:
sal_Int32 nMin; // range minimum value
sal_Int32 nMax; // range maximum value
@@ -127,7 +124,7 @@ public:
}
RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, bool bOwnClass = false ) override;
void Destroy( const RSCINST & rInst ) override;
- sal_uInt32 Size() override { return nSize; }
+ sal_uInt32 Size() const override { return ALIGNED_SIZE(sizeof(RscId)); }
virtual void SetToDefault( const RSCINST & rInst ) override
{
reinterpret_cast<RscId*>(rInst.pData)->aExp.cUnused = true;