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
0511c867
Kaydet (Commit)
0511c867
authored
Mar 26, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
const_cast: convert some C-style casts and remove some redundant ones
Change-Id: If774a3b4e2e993d26dd9b5777a55665a330b2abe
üst
21997319
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
21 additions
and
21 deletions
+21
-21
basmgr.cxx
basic/source/basmgr/basmgr.cxx
+2
-2
codegen.cxx
basic/source/comp/codegen.cxx
+1
-1
exprnode.cxx
basic/source/comp/exprnode.cxx
+1
-1
scanner.cxx
basic/source/comp/scanner.cxx
+1
-1
runtime.hxx
basic/source/inc/runtime.hxx
+1
-1
sbxobj.cxx
basic/source/sbx/sbxobj.cxx
+1
-1
sbxscan.cxx
basic/source/sbx/sbxscan.cxx
+1
-1
sbxstr.cxx
basic/source/sbx/sbxstr.cxx
+1
-1
sbxvalue.cxx
basic/source/sbx/sbxvalue.cxx
+8
-8
sbxvar.cxx
basic/source/sbx/sbxvar.cxx
+3
-3
sbxvar.hxx
include/basic/sbxvar.hxx
+1
-1
No files found.
basic/source/basmgr/basmgr.cxx
Dosyayı görüntüle @
0511c867
...
...
@@ -1583,14 +1583,14 @@ StarBASIC* BasicManager::CreateLibForLibContainer( const OUString& rLibName,
BasicLibInfo
*
BasicManager
::
FindLibInfo
(
StarBASIC
*
pBasic
)
const
{
BasicLibInfo
*
pInf
=
((
BasicManager
*
)
this
)
->
pLibs
->
First
();
BasicLibInfo
*
pInf
=
const_cast
<
BasicManager
*>
(
this
)
->
pLibs
->
First
();
while
(
pInf
)
{
if
(
pInf
->
GetLib
()
==
pBasic
)
{
return
pInf
;
}
pInf
=
((
BasicManager
*
)
this
)
->
pLibs
->
Next
();
pInf
=
const_cast
<
BasicManager
*>
(
this
)
->
pLibs
->
Next
();
}
return
0
;
}
...
...
basic/source/comp/codegen.cxx
Dosyayı görüntüle @
0511c867
...
...
@@ -338,7 +338,7 @@ void SbiCodeGen::Save()
SbxParamInfo
*
pParam
=
NULL
;
if
(
nUserData
)
{
pParam
=
(
SbxParamInfo
*
)
pInfo
->
GetParam
(
i
);
pParam
=
const_cast
<
SbxParamInfo
*>
(
pInfo
->
GetParam
(
i
)
);
}
if
(
pParam
)
{
...
...
basic/source/comp/exprnode.cxx
Dosyayı görüntüle @
0511c867
...
...
@@ -73,7 +73,7 @@ SbiExprNode::SbiExprNode( SbiParser* p, const SbiSymDef& r, SbxDataType t, SbiEx
eType
=
(
t
==
SbxVARIANT
)
?
r
.
GetType
()
:
t
;
eNodeType
=
SbxVARVAL
;
aVar
.
pDef
=
(
SbiSymDef
*
)
&
r
;
aVar
.
pDef
=
const_cast
<
SbiSymDef
*>
(
&
r
)
;
aVar
.
pPar
=
l
;
aVar
.
pvMorePar
=
NULL
;
aVar
.
pNext
=
NULL
;
...
...
basic/source/comp/scanner.cxx
Dosyayı görüntüle @
0511c867
...
...
@@ -275,7 +275,7 @@ bool SbiScanner::NextSym()
aSym
=
aSymCopy
;
// HACK: modifying a potentially shared string here!
*
((
sal_Unicode
*
)(
pLine
-
1
)
)
=
' '
;
*
const_cast
<
sal_Unicode
*>
(
pLine
-
1
)
=
' '
;
}
// type recognition?
...
...
basic/source/inc/runtime.hxx
Dosyayı görüntüle @
0511c867
...
...
@@ -189,7 +189,7 @@ public:
SbiDdeControl
*
GetDdeControl
()
{
return
pDdeCtrl
;
}
StarBASIC
*
GetBasic
(
void
)
{
return
pBasic
;
}
SbiDllMgr
*
GetDllMgr
();
SbiRTLData
*
GetRTLData
()
const
{
return
(
SbiRTLData
*
)
&
aRTLData
;
}
SbiRTLData
*
GetRTLData
()
const
{
return
const_cast
<
SbiRTLData
*>
(
&
aRTLData
)
;
}
SvNumberFormatter
*
GetNumberFormatter
();
sal_uInt32
GetStdDateIdx
()
const
{
return
nStdDateIdx
;
}
...
...
basic/source/sbx/sbxobj.cxx
Dosyayı görüntüle @
0511c867
...
...
@@ -671,7 +671,7 @@ bool SbxObject::StoreData( SvStream& rStrm ) const
{
return
false
;
}
((
SbxObject
*
)
this
)
->
SetModified
(
false
);
const_cast
<
SbxObject
*>
(
this
)
->
SetModified
(
false
);
return
true
;
}
...
...
basic/source/sbx/sbxscan.cxx
Dosyayı görüntüle @
0511c867
...
...
@@ -460,7 +460,7 @@ bool ImpConvStringExt( OUString& rSrc, SbxDataType eTargetType )
sal_Int32
nPos
=
aNewString
.
indexOf
(
cDecimalSep
);
if
(
nPos
!=
-
1
)
{
sal_Unicode
*
pStr
=
(
sal_Unicode
*
)
aNewString
.
getStr
(
);
sal_Unicode
*
pStr
=
const_cast
<
sal_Unicode
*>
(
aNewString
.
getStr
()
);
pStr
[
nPos
]
=
(
sal_Unicode
)
'.'
;
bChanged
=
true
;
}
...
...
basic/source/sbx/sbxstr.cxx
Dosyayı görüntüle @
0511c867
...
...
@@ -165,7 +165,7 @@ void ImpPutString( SbxValues* p, const OUString* n )
// as a precaution, if a NULL-Ptr appears
if
(
!
n
)
n
=
pTmp
=
new
OUString
;
aTmp
.
pOUString
=
(
OUString
*
)
n
;
aTmp
.
pOUString
=
const_cast
<
OUString
*>
(
n
)
;
switch
(
+
p
->
eType
)
{
case
SbxCHAR
:
...
...
basic/source/sbx/sbxvalue.cxx
Dosyayı görüntüle @
0511c867
...
...
@@ -97,7 +97,7 @@ SbxValue::SbxValue( const SbxValue& r )
}
else
{
((
SbxValue
*
)
&
r
)
->
Broadcast
(
SBX_HINT_DATAWANTED
);
const_cast
<
SbxValue
*>
(
&
r
)
->
Broadcast
(
SBX_HINT_DATAWANTED
);
aData
=
r
.
aData
;
// Copy pointer, increment references
switch
(
aData
.
eType
)
...
...
@@ -237,7 +237,7 @@ SbxValue* SbxValue::TheRealValue() const
SbxValue
*
SbxValue
::
TheRealValue
(
bool
bObjInObjError
)
const
{
SbxValue
*
p
=
(
SbxValue
*
)
this
;
SbxValue
*
p
=
const_cast
<
SbxValue
*>
(
this
)
;
for
(
;;
)
{
SbxDataType
t
=
SbxDataType
(
p
->
aData
.
eType
&
0x0FFF
);
...
...
@@ -412,11 +412,11 @@ const OUString& SbxValue::GetCoreString() const
aRes
.
eType
=
SbxCoreSTRING
;
if
(
Get
(
aRes
)
)
{
((
SbxValue
*
)
this
)
->
aToolString
=
*
aRes
.
pOUString
;
const_cast
<
SbxValue
*>
(
this
)
->
aToolString
=
*
aRes
.
pOUString
;
}
else
{
((
SbxValue
*
)
this
)
->
aToolString
.
clear
();
const_cast
<
SbxValue
*>
(
this
)
->
aToolString
.
clear
();
}
return
aToolString
;
}
...
...
@@ -598,7 +598,7 @@ bool SbxValue::PutStringExt( const OUString& r )
if
(
ImpConvStringExt
(
aStr
,
eTargetType
)
)
aRes
.
pOUString
=
(
OUString
*
)
&
aStr
;
else
aRes
.
pOUString
=
(
OUString
*
)
&
r
;
aRes
.
pOUString
=
const_cast
<
OUString
*>
(
&
r
)
;
// #34939: For Strings which contain a number, and if this has a Num-Type,
// set a Fixed flag so that the type will not be changed
...
...
@@ -677,7 +677,7 @@ bool SbxValue::PutString( const OUString& r )
{
SbxValues
aRes
;
aRes
.
eType
=
SbxSTRING
;
aRes
.
pOUString
=
(
OUString
*
)
&
r
;
aRes
.
pOUString
=
const_cast
<
OUString
*>
(
&
r
)
;
Put
(
aRes
);
return
!
IsError
();
}
...
...
@@ -1567,9 +1567,9 @@ bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
r
.
WriteInt32
(
aData
.
nLong
);
break
;
case
SbxDATE
:
// #49935: Save as double, otherwise an error during the read in
((
SbxValue
*
)
this
)
->
aData
.
eType
=
(
SbxDataType
)(
(
nType
&
0xF000
)
|
SbxDOUBLE
);
const_cast
<
SbxValue
*>
(
this
)
->
aData
.
eType
=
(
SbxDataType
)(
(
nType
&
0xF000
)
|
SbxDOUBLE
);
write_uInt16_lenPrefixed_uInt8s_FromOUString
(
r
,
GetCoreString
(),
RTL_TEXTENCODING_ASCII_US
);
((
SbxValue
*
)
this
)
->
aData
.
eType
=
(
SbxDataType
)
nType
;
const_cast
<
SbxValue
*>
(
this
)
->
aData
.
eType
=
(
SbxDataType
)
nType
;
break
;
case
SbxSINGLE
:
case
SbxDOUBLE
:
...
...
basic/source/sbx/sbxvar.cxx
Dosyayı görüntüle @
0511c867
...
...
@@ -226,7 +226,7 @@ const OUString& SbxVariable::GetName( SbxNameType t ) const
return
maName
;
}
// Request parameter-information (not for objects)
((
SbxVariable
*
)
this
)
->
GetInfo
();
const_cast
<
SbxVariable
*>
(
this
)
->
GetInfo
();
// Append nothing, if it is a simple property (no empty brackets)
if
(
!
pInfo
||
(
pInfo
->
aParams
.
empty
()
&&
GetClass
()
==
SbxCLASS_PROPERTY
))
{
...
...
@@ -317,7 +317,7 @@ const OUString& SbxVariable::GetName( SbxNameType t ) const
aTmp
+=
OUString
(
SbxRes
(
STRING_ANY
)
);
}
}
((
SbxVariable
*
)
this
)
->
aToolString
=
aTmp
;
const_cast
<
SbxVariable
*>
(
this
)
->
aToolString
=
aTmp
;
return
aToolString
;
}
...
...
@@ -594,7 +594,7 @@ bool SbxVariable::StoreData( SvStream& rStrm ) const
{
// #50200 Avoid that objects , which during the runtime
// as return-value are saved in the method as a value were saved
SbxVariable
*
pThis
=
(
SbxVariable
*
)
this
;
SbxVariable
*
pThis
=
const_cast
<
SbxVariable
*>
(
this
)
;
SbxFlagBits
nSaveFlags
=
GetFlags
();
pThis
->
SetFlag
(
SBX_WRITE
);
pThis
->
SbxValue
::
Clear
();
...
...
include/basic/sbxvar.hxx
Dosyayı görüntüle @
0511c867
...
...
@@ -80,7 +80,7 @@ struct SbxValues
SbxValues
(
unsigned
int
_nUInt
)
:
nUInt
(
_nUInt
),
eType
(
SbxUINT
)
{}
SbxValues
(
float
_nSingle
)
:
nSingle
(
_nSingle
),
eType
(
SbxSINGLE
)
{}
SbxValues
(
double
_nDouble
)
:
nDouble
(
_nDouble
),
eType
(
SbxDOUBLE
)
{}
SbxValues
(
const
OUString
*
_pString
)
:
pOUString
(
(
OUString
*
)
_pString
),
eType
(
SbxSTRING
)
{}
SbxValues
(
const
OUString
*
_pString
)
:
pOUString
(
const_cast
<
OUString
*>
(
_pString
)
),
eType
(
SbxSTRING
)
{}
SbxValues
(
SbxBase
*
_pObj
)
:
pObj
(
_pObj
),
eType
(
SbxOBJECT
)
{}
SbxValues
(
sal_Unicode
*
_pChar
)
:
pChar
(
_pChar
),
eType
(
SbxLPSTR
)
{}
SbxValues
(
void
*
_pData
)
:
pData
(
_pData
),
eType
(
SbxPOINTER
)
{}
...
...
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