Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
cf54f2a1
Kaydet (Commit)
cf54f2a1
authored
Mar 28, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clean up C-style casts from pointers to void
Change-Id: I85d6761e72ba2f67a1d67a94cae674cbb271b43f
üst
d963fd84
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
71 additions
and
71 deletions
+71
-71
rsckey.cxx
rsc/source/parser/rsckey.cxx
+6
-6
rscpar.cxx
rsc/source/parser/rscpar.cxx
+3
-3
rscyacc.y
rsc/source/parser/rscyacc.y
+1
-1
start.cxx
rsc/source/prj/start.cxx
+24
-24
rscarray.cxx
rsc/source/res/rscarray.cxx
+1
-1
rscclass.cxx
rsc/source/res/rscclass.cxx
+5
-5
rscconst.cxx
rsc/source/res/rscconst.cxx
+5
-5
rsccont.cxx
rsc/source/res/rsccont.cxx
+7
-7
rscflag.cxx
rsc/source/res/rscflag.cxx
+1
-1
rscmgr.cxx
rsc/source/res/rscmgr.cxx
+1
-1
rscrange.cxx
rsc/source/res/rscrange.cxx
+3
-3
rscstr.cxx
rsc/source/res/rscstr.cxx
+3
-3
rsc.cxx
rsc/source/rsc/rsc.cxx
+1
-1
rscchar.cxx
rsc/source/tools/rscchar.cxx
+1
-1
rsctools.cxx
rsc/source/tools/rsctools.cxx
+6
-6
rsctree.cxx
rsc/source/tools/rsctree.cxx
+3
-3
No files found.
rsc/source/parser/rsckey.cxx
Dosyayı görüntüle @
cf54f2a1
...
...
@@ -36,9 +36,9 @@ extern "C" {
int
SAL_CALL
KeyCompare
(
const
void
*
pFirst
,
const
void
*
pSecond
)
{
if
(
((
KEY_STRUCT
*
)
pFirst
)
->
nName
>
((
KEY_STRUCT
*
)
pSecond
)
->
nName
)
if
(
static_cast
<
KEY_STRUCT
const
*>
(
pFirst
)
->
nName
>
static_cast
<
KEY_STRUCT
const
*>
(
pSecond
)
->
nName
)
return
1
;
else
if
(
((
KEY_STRUCT
*
)
pFirst
)
->
nName
<
((
KEY_STRUCT
*
)
pSecond
)
->
nName
)
else
if
(
static_cast
<
KEY_STRUCT
const
*>
(
pFirst
)
->
nName
<
static_cast
<
KEY_STRUCT
const
*>
(
pSecond
)
->
nName
)
return
-
1
;
else
return
0
;
...
...
@@ -72,13 +72,13 @@ void RscNameTable::SetSort( bool bSorted )
Atom
RscNameTable
::
Put
(
Atom
nName
,
sal_uInt32
nTyp
,
long
nValue
)
{
if
(
pTable
)
pTable
=
(
KEY_STRUCT
*
)
pTable
=
static_cast
<
KEY_STRUCT
*>
(
rtl_reallocateMemory
(
(
void
*
)
pTable
,
((
nEntries
+
1
)
*
sizeof
(
KEY_STRUCT
))
);
((
nEntries
+
1
)
*
sizeof
(
KEY_STRUCT
))
)
)
;
else
pTable
=
(
KEY_STRUCT
*
)
pTable
=
static_cast
<
KEY_STRUCT
*>
(
rtl_allocateMemory
(
((
nEntries
+
1
)
*
sizeof
(
KEY_STRUCT
))
);
*
sizeof
(
KEY_STRUCT
))
)
)
;
pTable
[
nEntries
].
nName
=
nName
;
pTable
[
nEntries
].
nTyp
=
nTyp
;
...
...
rsc/source/parser/rscpar.cxx
Dosyayı görüntüle @
cf54f2a1
...
...
@@ -25,7 +25,7 @@ void RscFileInst::Init()
{
nLineNo
=
0
;
nLineBufLen
=
256
;
pLine
=
(
char
*
)
rtl_allocateMemory
(
nLineBufLen
);
pLine
=
static_cast
<
char
*>
(
rtl_allocateMemory
(
nLineBufLen
)
);
*
pLine
=
'\0'
;
nScanPos
=
0
;
cLastChar
=
'\0'
;
...
...
@@ -46,7 +46,7 @@ RscFileInst::RscFileInst( RscTypCont * pTC, sal_uLong lIndexSrc,
//Status: Zeiger am Ende des Lesepuffers
nInputPos
=
nInputEndPos
=
nInputBufLen
=
READBUFFER_MAX
;
pInput
=
(
char
*
)
rtl_allocateMemory
(
nInputBufLen
);
pInput
=
static_cast
<
char
*>
(
rtl_allocateMemory
(
nInputBufLen
)
);
}
RscFileInst
::~
RscFileInst
()
...
...
@@ -96,7 +96,7 @@ void RscFileInst::GetNewLine()
{
nLineBufLen
+=
256
;
// einen dazu fuer '\0'
pLine
=
(
char
*
)
rtl_reallocateMemory
(
pLine
,
nLineBufLen
+
1
);
pLine
=
static_cast
<
char
*>
(
rtl_reallocateMemory
(
pLine
,
nLineBufLen
+
1
)
);
}
// cr lf, lf cr, lf oder cr wird '\0'
...
...
rsc/source/parser/rscyacc.y
Dosyayı görüntüle @
cf54f2a1
...
...
@@ -1164,7 +1164,7 @@ string_multiline
rtl::OStringBuffer aBuf( 256 );
aBuf.append( $1 );
aBuf.append( $2 );
$$ =
(char*)pStringContainer->putString( aBuf.getStr()
);
$$ =
const_cast<char*>(pStringContainer->putString( aBuf.getStr() )
);
}
;
...
...
rsc/source/prj/start.cxx
Dosyayı görüntüle @
cf54f2a1
...
...
@@ -64,7 +64,7 @@ static bool CallPrePro( const OString& rInput,
bool
bVerbose
=
false
;
for
(
i
=
1
;
i
<
int
(
pCmdLine
->
GetCount
()
-
1
);
i
++
)
{
if
(
0
==
rsc_stricmp
(
(
char
*
)
pCmdLine
->
GetEntry
(
i
),
"-verbose"
)
)
if
(
0
==
rsc_stricmp
(
static_cast
<
char
*>
(
pCmdLine
->
GetEntry
(
i
)
),
"-verbose"
)
)
{
bVerbose
=
true
;
continue
;
...
...
@@ -86,11 +86,11 @@ static bool CallPrePro( const OString& rInput,
// ignore args starting with "-isystem"
continue
;
}
if
(
!
rsc_strnicmp
(
(
char
*
)
pCmdLine
->
GetEntry
(
i
),
"-u"
,
2
)
||
!
rsc_strnicmp
(
(
char
*
)
pCmdLine
->
GetEntry
(
i
),
"-i"
,
2
)
||
!
rsc_strnicmp
(
(
char
*
)
pCmdLine
->
GetEntry
(
i
),
"-d"
,
2
))
if
(
!
rsc_strnicmp
(
static_cast
<
char
*>
(
pCmdLine
->
GetEntry
(
i
)
),
"-u"
,
2
)
||
!
rsc_strnicmp
(
static_cast
<
char
*>
(
pCmdLine
->
GetEntry
(
i
)
),
"-i"
,
2
)
||
!
rsc_strnicmp
(
static_cast
<
char
*>
(
pCmdLine
->
GetEntry
(
i
)
),
"-d"
,
2
))
{
aNewCmdL
.
Append
(
rsc_strdup
(
(
char
*
)
pCmdLine
->
GetEntry
(
i
)
)
);
aNewCmdL
.
Append
(
rsc_strdup
(
static_cast
<
char
*>
(
pCmdLine
->
GetEntry
(
i
)
)
)
);
}
}
...
...
@@ -104,7 +104,7 @@ static bool CallPrePro( const OString& rInput,
for
(
i
=
0
;
i
<
(
int
)(
pCmdL
->
GetCount
()
-
1
);
i
++
)
{
printf
(
" "
);
printf
(
"%s"
,
(
const
char
*
)
pCmdL
->
GetEntry
(
i
)
);
printf
(
"%s"
,
static_cast
<
const
char
*>
(
pCmdL
->
GetEntry
(
i
)
)
);
}
printf
(
"
\n
"
);
}
...
...
@@ -120,7 +120,7 @@ static bool CallPrePro( const OString& rInput,
pCmdL
=
&
aRespCmdL
;
for
(
i
=
0
;
i
<
(
int
)(
aNewCmdL
.
GetCount
()
-
1
);
i
++
)
{
fprintf
(
fRspFile
,
"%s "
,
(
const
char
*
)
aNewCmdL
.
GetEntry
(
i
)
);
fprintf
(
fRspFile
,
"%s "
,
static_cast
<
const
char
*>
(
aNewCmdL
.
GetEntry
(
i
)
)
);
}
fclose
(
fRspFile
);
...
...
@@ -130,13 +130,13 @@ static bool CallPrePro( const OString& rInput,
for
(
i
=
0
;
i
<
(
int
)(
pCmdL
->
GetCount
()
-
1
);
i
++
)
{
printf
(
" "
);
printf
(
"%s"
,
(
const
char
*
)
pCmdL
->
GetEntry
(
i
)
);
printf
(
"%s"
,
static_cast
<
const
char
*>
(
pCmdL
->
GetEntry
(
i
)
)
);
}
printf
(
"
\n
"
);
}
}
nRet
=
rscpp_main
(
pCmdL
->
GetCount
()
-
1
,
(
char
**
)
pCmdL
->
GetBlock
(
)
);
nRet
=
rscpp_main
(
pCmdL
->
GetCount
()
-
1
,
reinterpret_cast
<
char
**>
(
pCmdL
->
GetBlock
()
)
);
if
(
fRspFile
)
{
...
...
@@ -164,30 +164,30 @@ static bool CallRsc2( RscStrList * pInputList,
for
(
int
i
=
1
;
i
<
(
int
)(
pCmdLine
->
GetCount
()
-
1
);
++
i
)
{
if
(
!
rsc_stricmp
(
(
char
*
)
pCmdLine
->
GetEntry
(
i
),
"-verbose"
)
)
if
(
!
rsc_stricmp
(
static_cast
<
char
*>
(
pCmdLine
->
GetEntry
(
i
)
),
"-verbose"
)
)
{
eVerbosity
=
RscVerbosityVerbose
;
continue
;
}
if
(
!
rsc_stricmp
(
(
char
*
)
pCmdLine
->
GetEntry
(
i
),
"-quiet"
)
)
if
(
!
rsc_stricmp
(
static_cast
<
char
*>
(
pCmdLine
->
GetEntry
(
i
)
),
"-quiet"
)
)
{
eVerbosity
=
RscVerbositySilent
;
continue
;
}
if
(
!
rsc_strnicmp
(
(
char
*
)
pCmdLine
->
GetEntry
(
i
),
"-fp="
,
4
)
||
!
rsc_strnicmp
(
(
char
*
)
pCmdLine
->
GetEntry
(
i
),
"-fo="
,
4
)
||
!
rsc_strnicmp
(
(
char
*
)
pCmdLine
->
GetEntry
(
i
),
"-presponse"
,
10
)
||
!
rsc_strnicmp
(
(
char
*
)
pCmdLine
->
GetEntry
(
i
),
"-rc"
,
3
)
||
!
rsc_stricmp
(
(
char
*
)
pCmdLine
->
GetEntry
(
i
),
"-+"
)
||
!
rsc_stricmp
(
(
char
*
)
pCmdLine
->
GetEntry
(
i
),
"-br"
)
||
!
rsc_stricmp
(
(
char
*
)
pCmdLine
->
GetEntry
(
i
),
"-bz"
)
||
!
rsc_stricmp
(
(
char
*
)
pCmdLine
->
GetEntry
(
i
),
"-r"
)
||
(
'-'
!=
*
(
char
*
)
pCmdLine
->
GetEntry
(
i
)
)
)
if
(
!
rsc_strnicmp
(
static_cast
<
char
*>
(
pCmdLine
->
GetEntry
(
i
)
),
"-fp="
,
4
)
||
!
rsc_strnicmp
(
static_cast
<
char
*>
(
pCmdLine
->
GetEntry
(
i
)
),
"-fo="
,
4
)
||
!
rsc_strnicmp
(
static_cast
<
char
*>
(
pCmdLine
->
GetEntry
(
i
)
),
"-presponse"
,
10
)
||
!
rsc_strnicmp
(
static_cast
<
char
*>
(
pCmdLine
->
GetEntry
(
i
)
),
"-rc"
,
3
)
||
!
rsc_stricmp
(
static_cast
<
char
*>
(
pCmdLine
->
GetEntry
(
i
)
),
"-+"
)
||
!
rsc_stricmp
(
static_cast
<
char
*>
(
pCmdLine
->
GetEntry
(
i
)
),
"-br"
)
||
!
rsc_stricmp
(
static_cast
<
char
*>
(
pCmdLine
->
GetEntry
(
i
)
),
"-bz"
)
||
!
rsc_stricmp
(
static_cast
<
char
*>
(
pCmdLine
->
GetEntry
(
i
)
),
"-r"
)
||
(
'-'
!=
*
static_cast
<
char
*>
(
pCmdLine
->
GetEntry
(
i
)
)
)
)
{
}
else
{
aNewCmdL
.
Append
(
rsc_strdup
(
(
char
*
)
pCmdLine
->
GetEntry
(
i
)
)
);
aNewCmdL
.
Append
(
rsc_strdup
(
static_cast
<
char
*>
(
pCmdLine
->
GetEntry
(
i
)
)
)
);
}
}
...
...
@@ -204,12 +204,12 @@ static bool CallRsc2( RscStrList * pInputList,
printf
(
"Rsc2 commandline: "
);
for
(
size_t
i
=
0
;
i
<
(
unsigned
int
)(
aNewCmdL
.
GetCount
()
-
1
);
i
++
)
{
printf
(
" %s"
,
(
const
char
*
)
aNewCmdL
.
GetEntry
(
i
)
);
printf
(
" %s"
,
static_cast
<
const
char
*>
(
aNewCmdL
.
GetEntry
(
i
)
)
);
}
printf
(
"
\n
"
);
}
nRet
=
rsc2_main
(
aNewCmdL
.
GetCount
(),
(
char
**
)
aNewCmdL
.
GetBlock
(
)
);
nRet
=
rsc2_main
(
aNewCmdL
.
GetCount
(),
reinterpret_cast
<
char
**>
(
aNewCmdL
.
GetBlock
()
)
);
if
(
nRet
)
return
false
;
...
...
@@ -238,7 +238,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
return
1
;
};
ppStr
=
(
char
**
)
aCmdLine
.
GetBlock
(
);
ppStr
=
reinterpret_cast
<
char
**>
(
aCmdLine
.
GetBlock
()
);
ppStr
++
;
i
=
1
;
bool
bSetSrs
=
false
;
...
...
rsc/source/res/rscarray.cxx
Dosyayı görüntüle @
cf54f2a1
...
...
@@ -94,7 +94,7 @@ RSCINST RscArray::Create( RSCINST * pInst, const RSCINST & rDflt,
if
(
!
pInst
)
{
aInst
.
pClass
=
this
;
aInst
.
pData
=
(
CLASS_DATA
)
rtl_allocateMemory
(
Size
()
);
aInst
.
pData
=
static_cast
<
CLASS_DATA
>
(
rtl_allocateMemory
(
Size
()
)
);
}
else
aInst
=
*
pInst
;
...
...
rsc/source/res/rscclass.cxx
Dosyayı görüntüle @
cf54f2a1
...
...
@@ -148,7 +148,7 @@ RSCINST RscClass::Create( RSCINST * pInst,
if
(
!
pInst
)
{
aInst
.
pClass
=
this
;
aInst
.
pData
=
(
CLASS_DATA
)
rtl_allocateMemory
(
Size
()
);
aInst
.
pData
=
static_cast
<
CLASS_DATA
>
(
rtl_allocateMemory
(
Size
()
)
);
}
else
aInst
=
*
pInst
;
...
...
@@ -234,13 +234,13 @@ ERRTYPE RscClass::SetVariable( Atom nVarName,
{
if
(
pVarTypeList
)
{
pVarTypeList
=
(
VARTYPE_STRUCT
*
)
rtl_reallocateMemory
(
(
void
*
)
pVarTypeList
,
((
nEntries
+
1
)
*
sizeof
(
VARTYPE_STRUCT
))
);
pVarTypeList
=
static_cast
<
VARTYPE_STRUCT
*>
(
rtl_reallocateMemory
(
(
void
*
)
pVarTypeList
,
((
nEntries
+
1
)
*
sizeof
(
VARTYPE_STRUCT
))
)
)
;
}
else
{
pVarTypeList
=
(
VARTYPE_STRUCT
*
)
rtl_allocateMemory
(
((
nEntries
+
1
)
*
sizeof
(
VARTYPE_STRUCT
))
);
pVarTypeList
=
static_cast
<
VARTYPE_STRUCT
*>
(
rtl_allocateMemory
(
((
nEntries
+
1
)
*
sizeof
(
VARTYPE_STRUCT
))
)
)
;
}
pVarTypeList
[
nEntries
].
nVarName
=
nVarName
;
pVarTypeList
[
nEntries
].
nMask
=
nMask
;
...
...
rsc/source/res/rscconst.cxx
Dosyayı görüntüle @
cf54f2a1
...
...
@@ -47,10 +47,10 @@ RSCCLASS_TYPE RscConst::GetClassType() const
ERRTYPE
RscConst
::
SetConstant
(
Atom
nVarName
,
sal_Int32
lValue
)
{
if
(
pVarArray
)
pVarArray
=
(
VarEle
*
)
rtl_reallocateMemory
(
(
void
*
)
pVarArray
,
((
nEntries
+
1
)
*
sizeof
(
VarEle
))
);
pVarArray
=
static_cast
<
VarEle
*>
(
rtl_reallocateMemory
(
(
void
*
)
pVarArray
,
((
nEntries
+
1
)
*
sizeof
(
VarEle
))
)
)
;
else
pVarArray
=
(
VarEle
*
)
rtl_allocateMemory
(
((
nEntries
+
1
)
*
sizeof
(
VarEle
))
);
pVarArray
=
static_cast
<
VarEle
*>
(
rtl_allocateMemory
(
((
nEntries
+
1
)
*
sizeof
(
VarEle
))
)
);
pVarArray
[
nEntries
].
nId
=
nVarName
;
pVarArray
[
nEntries
].
lValue
=
lValue
;
nEntries
++
;
...
...
@@ -159,8 +159,8 @@ RSCINST RscEnum::Create( RSCINST * pInst, const RSCINST & rDflt, bool bOwnClass
if
(
!
pInst
)
{
aInst
.
pClass
=
this
;
aInst
.
pData
=
(
CLASS_DATA
)
rtl_allocateMemory
(
sizeof
(
RscEnumInst
)
);
aInst
.
pData
=
static_cast
<
CLASS_DATA
>
(
rtl_allocateMemory
(
sizeof
(
RscEnumInst
)
)
)
;
}
else
aInst
=
*
pInst
;
...
...
rsc/source/res/rsccont.cxx
Dosyayı görüntüle @
cf54f2a1
...
...
@@ -79,7 +79,7 @@ RSCINST RscBaseCont::Create( RSCINST * pInst, const RSCINST & rDflt,
if
(
!
pInst
)
{
aInst
.
pClass
=
this
;
aInst
.
pData
=
(
CLASS_DATA
)
rtl_allocateMemory
(
Size
()
);
aInst
.
pData
=
static_cast
<
CLASS_DATA
>
(
rtl_allocateMemory
(
Size
()
)
);
}
else
aInst
=
*
pInst
;
...
...
@@ -105,8 +105,8 @@ RSCINST RscBaseCont::Create( RSCINST * pInst, const RSCINST & rDflt,
{
*
pClassData
=
*
pDfltClassData
;
pClassData
->
pEntries
=
(
ENTRY_STRUCT
*
)
rtl_allocateMemory
(
sizeof
(
ENTRY_STRUCT
)
*
pClassData
->
nEntries
);
static_cast
<
ENTRY_STRUCT
*>
(
rtl_allocateMemory
(
sizeof
(
ENTRY_STRUCT
)
*
pClassData
->
nEntries
)
)
;
for
(
sal_uInt32
i
=
0
;
i
<
pClassData
->
nEntries
;
i
++
)
{
pClassData
->
pEntries
[
i
].
Create
();
...
...
@@ -213,14 +213,14 @@ ERRTYPE RscBaseCont::GetElement( const RSCINST & rInst, const RscId & rEleName,
if
(
pClassData
->
pEntries
)
{
pClassData
->
pEntries
=
(
ENTRY_STRUCT
*
)
rtl_reallocateMemory
(
pClassData
->
pEntries
,
sizeof
(
ENTRY_STRUCT
)
*
(
pClassData
->
nEntries
+
1
)
);
static_cast
<
ENTRY_STRUCT
*>
(
rtl_reallocateMemory
(
pClassData
->
pEntries
,
sizeof
(
ENTRY_STRUCT
)
*
(
pClassData
->
nEntries
+
1
)
)
)
;
}
else
{
pClassData
->
pEntries
=
(
ENTRY_STRUCT
*
)
rtl_allocateMemory
(
sizeof
(
ENTRY_STRUCT
)
*
(
pClassData
->
nEntries
+
1
)
);
static_cast
<
ENTRY_STRUCT
*>
(
rtl_allocateMemory
(
sizeof
(
ENTRY_STRUCT
)
*
(
pClassData
->
nEntries
+
1
)
)
)
;
}
pClassData
->
pEntries
[
pClassData
->
nEntries
].
Create
();
...
...
rsc/source/res/rscflag.cxx
Dosyayı görüntüle @
cf54f2a1
...
...
@@ -76,7 +76,7 @@ RSCINST RscFlag::CreateBasic( RSCINST * pInst )
if
(
!
pInst
)
{
aInst
.
pClass
=
this
;
aInst
.
pData
=
(
CLASS_DATA
)
rtl_allocateMemory
(
Size
()
);
aInst
.
pData
=
static_cast
<
CLASS_DATA
>
(
rtl_allocateMemory
(
Size
()
)
);
}
else
aInst
=
*
pInst
;
...
...
rsc/source/res/rscmgr.cxx
Dosyayı görüntüle @
cf54f2a1
...
...
@@ -44,7 +44,7 @@ RSCINST RscMgr::Create( RSCINST * pInst, const RSCINST & rDflt, bool bOwnClass )
if
(
!
pInst
)
{
aInst
.
pClass
=
this
;
aInst
.
pData
=
(
CLASS_DATA
)
rtl_allocateMemory
(
Size
()
);
aInst
.
pData
=
static_cast
<
CLASS_DATA
>
(
rtl_allocateMemory
(
Size
()
)
);
}
else
aInst
=
*
pInst
;
...
...
rsc/source/res/rscrange.cxx
Dosyayı görüntüle @
cf54f2a1
...
...
@@ -90,7 +90,7 @@ RSCINST RscRange::Create( RSCINST * pInst, const RSCINST & rDflt,
if
(
!
pInst
)
{
aInst
.
pClass
=
this
;
aInst
.
pData
=
(
CLASS_DATA
)
rtl_allocateMemory
(
sizeof
(
RscRangeInst
)
);
aInst
.
pData
=
static_cast
<
CLASS_DATA
>
(
rtl_allocateMemory
(
sizeof
(
RscRangeInst
)
)
);
}
else
aInst
=
*
pInst
;
...
...
@@ -202,7 +202,7 @@ RSCINST RscLongRange::Create( RSCINST * pInst, const RSCINST & rDflt,
if
(
!
pInst
)
{
aInst
.
pClass
=
this
;
aInst
.
pData
=
(
CLASS_DATA
)
rtl_allocateMemory
(
sizeof
(
RscLongRangeInst
)
);
aInst
.
pData
=
static_cast
<
CLASS_DATA
>
(
rtl_allocateMemory
(
sizeof
(
RscLongRangeInst
)
)
);
}
else
aInst
=
*
pInst
;
...
...
@@ -278,7 +278,7 @@ RSCINST RscIdRange::Create( RSCINST * pInst, const RSCINST & rDflt, bool bOwnCla
if
(
!
pInst
)
{
aInst
.
pClass
=
this
;
aInst
.
pData
=
(
CLASS_DATA
)
rtl_allocateMemory
(
sizeof
(
RscId
)
);
aInst
.
pData
=
static_cast
<
CLASS_DATA
>
(
rtl_allocateMemory
(
sizeof
(
RscId
)
)
);
}
else
aInst
=
*
pInst
;
...
...
rsc/source/res/rscstr.cxx
Dosyayı görüntüle @
cf54f2a1
...
...
@@ -59,7 +59,7 @@ ERRTYPE RscString::SetString( const RSCINST & rInst, const char * pStr )
if
(
pStr
)
{
sal_uInt32
nLen
=
strlen
(
pStr
)
+
1
;
pTmp
=
(
char
*
)
rtl_allocateMemory
(
nLen
);
pTmp
=
static_cast
<
char
*>
(
rtl_allocateMemory
(
nLen
)
);
memcpy
(
pTmp
,
pStr
,
nLen
);
}
...
...
@@ -102,8 +102,8 @@ RSCINST RscString::Create( RSCINST * pInst, const RSCINST & rDflt,
if
(
!
pInst
)
{
aInst
.
pClass
=
this
;
aInst
.
pData
=
(
CLASS_DATA
)
rtl_allocateMemory
(
sizeof
(
RscStringInst
)
);
aInst
.
pData
=
static_cast
<
CLASS_DATA
>
(
rtl_allocateMemory
(
sizeof
(
RscStringInst
)
)
)
;
}
else
aInst
=
*
pInst
;
...
...
rsc/source/rsc/rsc.cxx
Dosyayı görüntüle @
cf54f2a1
...
...
@@ -91,7 +91,7 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH )
pEH
->
FatalError
(
ERR_OPENFILE
,
RscId
(),
pStr
);
/* check the inputted switches */
ppStr
=
(
char
**
)
aCmdLine
.
GetBlock
(
);
ppStr
=
reinterpret_cast
<
char
**>
(
aCmdLine
.
GetBlock
()
);
ppStr
++
;
i
=
1
;
while
(
ppStr
&&
i
<
(
aCmdLine
.
GetCount
()
-
1
)
)
...
...
rsc/source/tools/rscchar.cxx
Dosyayı görüntüle @
cf54f2a1
...
...
@@ -151,7 +151,7 @@ char * RscChar::MakeUTF8( char * pStr, sal_uInt16 nTextEncoding )
hConv
=
rtl_createUnicodeToTextConverter
(
RTL_TEXTENCODING_UTF8
);
// factor of 6 is the maximum size of an UNICODE character as utf8
char
*
pUtf8
=
(
char
*
)
rtl_allocateMemory
(
nUniSize
*
6
);
char
*
pUtf8
=
static_cast
<
char
*>
(
rtl_allocateMemory
(
nUniSize
*
6
)
);
rtl_convertUnicodeToText
(
hConv
,
0
,
pUniCode
,
nUniSize
,
pUtf8
,
nUniSize
*
6
,
...
...
rsc/source/tools/rsctools.cxx
Dosyayı görüntüle @
cf54f2a1
...
...
@@ -74,7 +74,7 @@ int rsc_stricmp( const char *string1, const char *string2 ){
char
*
rsc_strdup
(
const
char
*
pStr
)
{
int
nLen
=
strlen
(
pStr
);
char
*
pBuffer
=
(
char
*
)
rtl_allocateMemory
(
nLen
+
1
);
char
*
pBuffer
=
static_cast
<
char
*>
(
rtl_allocateMemory
(
nLen
+
1
)
);
memcpy
(
pBuffer
,
pStr
,
nLen
+
1
);
return
pBuffer
;
}
...
...
@@ -222,11 +222,11 @@ void RscPtrPtr :: Reset()
sal_uInt32
RscPtrPtr
::
Append
(
void
*
pBuffer
)
{
if
(
!
pMem
)
pMem
=
(
void
**
)
rtl_allocateMemory
(
(
nCount
+
1
)
*
sizeof
(
void
*
)
);
pMem
=
static_cast
<
void
**>
(
rtl_allocateMemory
(
(
nCount
+
1
)
*
sizeof
(
void
*
)
)
);
else
pMem
=
(
void
**
)
rtl_reallocateMemory
(
(
void
*
)
pMem
,
pMem
=
static_cast
<
void
**>
(
rtl_reallocateMemory
(
(
void
*
)
pMem
,
((
nCount
+
1
)
*
sizeof
(
void
*
)
)
);
)
)
)
;
pMem
[
nCount
]
=
pBuffer
;
return
nCount
++
;
}
...
...
@@ -267,7 +267,7 @@ sal_uInt32 RscWriteRc :: IncSize( sal_uInt32 nSize )
sal_uInt32
nOrigPos
=
nLen
;
nLen
+=
nSize
;
if
(
pMem
)
pMem
=
(
char
*
)
rtl_reallocateMemory
(
pMem
,
nLen
);
pMem
=
static_cast
<
char
*>
(
rtl_reallocateMemory
(
pMem
,
nLen
)
);
if
(
pMem
)
memset
(
pMem
+
nOrigPos
,
0
,
nSize
);
return
nOrigPos
;
...
...
@@ -277,7 +277,7 @@ char * RscWriteRc :: GetPointer( sal_uInt32 nSize )
{
if
(
!
pMem
)
{
pMem
=
(
char
*
)
rtl_allocateMemory
(
nLen
);
pMem
=
static_cast
<
char
*>
(
rtl_allocateMemory
(
nLen
)
);
memset
(
pMem
,
0
,
nLen
);
}
return
pMem
+
nSize
;
...
...
rsc/source/tools/rsctree.cxx
Dosyayı görüntüle @
cf54f2a1
...
...
@@ -343,9 +343,9 @@ COMPARE IdNode::Compare( const NameNode * pSearch ) const
// pSearch ist ein Zeiger auf sal_uInt32
COMPARE
IdNode
::
Compare
(
const
void
*
pSearch
)
const
{
if
(
GetId
()
<
*
((
const
sal_uInt32
*
)
pSearch
)
)
if
(
GetId
()
<
*
static_cast
<
const
sal_uInt32
*>
(
pSearch
)
)
return
LESS
;
else
if
(
GetId
()
>
*
((
const
sal_uInt32
*
)
pSearch
)
)
else
if
(
GetId
()
>
*
static_cast
<
const
sal_uInt32
*>
(
pSearch
)
)
return
GREATER
;
else
return
EQUAL
;
...
...
@@ -376,7 +376,7 @@ COMPARE StringNode::Compare( const NameNode * pSearch ) const
// pSearch ist ein Zeiger auf const char *
COMPARE
StringNode
::
Compare
(
const
void
*
pSearch
)
const
{
int
nCmp
=
strcmp
(
m_aName
.
getStr
(),
(
const
char
*
)
pSearch
);
int
nCmp
=
strcmp
(
m_aName
.
getStr
(),
static_cast
<
const
char
*>
(
pSearch
)
);
if
(
nCmp
<
0
)
return
LESS
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment