summaryrefslogtreecommitdiff
path: root/rsc/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-09 11:29:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-13 09:38:13 +0000
commite2e76df7e48fb77f1e802f57c7d9a22eb8c74c5a (patch)
tree15a072f5563c843939b0900aed256b7c89340407 /rsc/source
parent417bc898802630c567d970d0283312697acdd5ff (diff)
create strong_int template and use it in tools::UniqueIndex
an experiment to see how useful a strong_int template works out Change-Id: Ib77700350f0fa3b018a1926233adf7a40d728d16 Reviewed-on: https://gerrit.libreoffice.org/34072 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'rsc/source')
-rw-r--r--rsc/source/parser/rscdb.cxx10
-rw-r--r--rsc/source/parser/rscpar.cxx4
-rw-r--r--rsc/source/res/rscclobj.cxx4
-rw-r--r--rsc/source/rsc/rsc.cxx4
-rw-r--r--rsc/source/tools/rscdef.cxx12
5 files changed, 17 insertions, 17 deletions
diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx
index bb0fecf03706..1675cc4f8d1e 100644
--- a/rsc/source/parser/rscdb.cxx
+++ b/rsc/source/parser/rscdb.cxx
@@ -239,7 +239,7 @@ private:
ERRTYPE aError; // contains the first field
RscTypCont* pTypCont;
FILE * fOutput; // output file
- sal_uLong lFileKey; // what source file
+ RscFileTab::Index lFileKey; // what source file
RscTop * pClass;
RscEnumerateObj(RscTypCont* pTC, FILE* pOutputFile)
@@ -358,7 +358,7 @@ public:
pRoot->EnumNodes( LINK( this, RscEnumerateRef, CallBackWriteRc ) );
return aEnumObj.aError;
}
- ERRTYPE const & WriteSrc( sal_uLong lFileKey )
+ ERRTYPE const & WriteSrc( RscFileTab::Index lFileKey )
{
aEnumObj.lFileKey = lFileKey;
@@ -424,14 +424,14 @@ void RscTypCont::WriteSrc( FILE * fOutput, RscFileTab::Index nFileKey )
class RscDel
{
- sal_uLong lFileKey;
+ RscFileTab::Index lFileKey;
DECL_LINK( Delete, const NameNode&, void );
public:
- RscDel( RscTop * pRoot, sal_uLong lKey );
+ RscDel( RscTop * pRoot, RscFileTab::Index lKey );
};
-inline RscDel::RscDel( RscTop * pRoot, sal_uLong lKey )
+inline RscDel::RscDel( RscTop * pRoot, RscFileTab::Index lKey )
: lFileKey(lKey)
{
pRoot->EnumNodes( LINK( this, RscDel, Delete ) );
diff --git a/rsc/source/parser/rscpar.cxx b/rsc/source/parser/rscpar.cxx
index d81d3aae9c57..4fc1b11f8cdf 100644
--- a/rsc/source/parser/rscpar.cxx
+++ b/rsc/source/parser/rscpar.cxx
@@ -32,8 +32,8 @@ void RscFileInst::Init()
bEof = false;
}
-RscFileInst::RscFileInst( RscTypCont * pTC, sal_uLong lIndexSrc,
- sal_uLong lFIndex, FILE * fFile )
+RscFileInst::RscFileInst( RscTypCont * pTC, RscFileTab::Index lIndexSrc,
+ RscFileTab::Index lFIndex, FILE * fFile )
: nErrorLine(0)
, nErrorPos(0)
{
diff --git a/rsc/source/res/rscclobj.cxx b/rsc/source/res/rscclobj.cxx
index 80969f704553..29184286cd8d 100644
--- a/rsc/source/res/rscclobj.cxx
+++ b/rsc/source/res/rscclobj.cxx
@@ -56,14 +56,14 @@ ObjNode * RefNode::GetObjNode( const RscId & rRscId )
return nullptr;
}
-ObjNode::ObjNode( const RscId & rId, CLASS_DATA pData, sal_uLong lKey )
+ObjNode::ObjNode( const RscId & rId, CLASS_DATA pData, RscFileTab::Index lKey )
: aRscId(rId)
, pRscObj(pData)
, lFileKey(lKey)
{
}
-ObjNode * ObjNode::DelObjNode( RscTop * pClass, sal_uLong nFileKey )
+ObjNode * ObjNode::DelObjNode( RscTop * pClass, RscFileTab::Index nFileKey )
{
ObjNode * pRetNode = this;
diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx
index 0b44a618e5f7..8ccfd83f6c77 100644
--- a/rsc/source/rsc/rsc.cxx
+++ b/rsc/source/rsc/rsc.cxx
@@ -405,7 +405,7 @@ void RscCompiler::EndCompile()
}
}
-ERRTYPE RscCompiler::IncludeParser( sal_uLong lFileKey )
+ERRTYPE RscCompiler::IncludeParser( RscFileTab::Index lFileKey )
{
FILE * finput;
RscFile * pFName;
@@ -448,7 +448,7 @@ ERRTYPE RscCompiler::IncludeParser( sal_uLong lFileKey )
return aError;
}
-ERRTYPE RscCompiler::ParseOneFile( sal_uLong lFileKey,
+ERRTYPE RscCompiler::ParseOneFile( RscFileTab::Index lFileKey,
const RscCmdLine::OutputFile* pOutputFile,
const WriteRcContext* pContext )
{
diff --git a/rsc/source/tools/rscdef.cxx b/rsc/source/tools/rscdef.cxx
index 2e2a05767bfb..4ff0216cc547 100644
--- a/rsc/source/tools/rscdef.cxx
+++ b/rsc/source/tools/rscdef.cxx
@@ -114,7 +114,7 @@ OString RscId::GetName() const
return aStr.makeStringAndClear();
}
-RscDefine::RscDefine( sal_uLong lKey, const OString& rDefName, sal_Int32 lDefId )
+RscDefine::RscDefine( RscFileTab::Index lKey, const OString& rDefName, sal_Int32 lDefId )
: m_aName( rDefName )
{
nRefCount = 0;
@@ -123,7 +123,7 @@ RscDefine::RscDefine( sal_uLong lKey, const OString& rDefName, sal_Int32 lDefId
pExp = nullptr;
}
-RscDefine::RscDefine( sal_uLong lKey, const OString& rDefName,
+RscDefine::RscDefine( RscFileTab::Index lKey, const OString& rDefName,
RscExpression * pExpression )
: lId(0), m_aName( rDefName )
{
@@ -192,7 +192,7 @@ COMPARE RscDefine::Compare( const void * pSearch ) const
return EQUAL;
}
-RscDefine * RscDefineList::New( sal_uLong lFileKey, const OString& rDefName,
+RscDefine * RscDefineList::New( RscFileTab::Index lFileKey, const OString& rDefName,
sal_Int32 lDefId, size_t lPos )
{
RscDefine * pDef;
@@ -212,7 +212,7 @@ RscDefine * RscDefineList::New( sal_uLong lFileKey, const OString& rDefName,
return pDef;
}
-RscDefine * RscDefineList::New( sal_uLong lFileKey, const OString& rDefName,
+RscDefine * RscDefineList::New( RscFileTab::Index lFileKey, const OString& rDefName,
RscExpression * pExpression, size_t lPos )
{
RscDefine * pDef;
@@ -386,7 +386,7 @@ RscFile::~RscFile()
while( aDefLst.Remove() ) ;
}
-bool RscFile::Depend( sal_uLong lDepend, sal_uLong lFree )
+bool RscFile::Depend( RscFileTab::Index lDepend, RscFileTab::Index lFree )
{
for ( size_t i = aDepLst.size(); i > 0; )
{
@@ -405,7 +405,7 @@ bool RscFile::Depend( sal_uLong lDepend, sal_uLong lFree )
return true;
}
-void RscFile::InsertDependFile( sal_uLong lIncFile )
+void RscFile::InsertDependFile( RscFileTab::Index lIncFile )
{
for ( size_t i = 0, n = aDepLst.size(); i < n; ++i )
{