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
581c5075
Kaydet (Commit)
581c5075
authored
Mar 31, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Reduce to static_cast any reinterpret_cast from void pointers
Change-Id: I062024d4768374e319b6c67ed8c7abcc89f9d552
üst
b57f8a94
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
21 deletions
+21
-21
anytostring.cxx
comphelper/source/misc/anytostring.cxx
+1
-1
types.cxx
comphelper/source/misc/types.cxx
+14
-14
propertycontainerhelper.cxx
comphelper/source/property/propertycontainerhelper.cxx
+3
-3
extract.hxx
include/comphelper/extract.hxx
+1
-1
uno3.hxx
include/comphelper/uno3.hxx
+2
-2
No files found.
comphelper/source/misc/anytostring.cxx
Dosyayı görüntüle @
581c5075
...
...
@@ -196,7 +196,7 @@ void appendValue( OUStringBuffer & buf,
break
;
}
case
typelib_TypeClass_TYPE
:
buf
.
append
(
(
*
reinterpret
_cast
<
buf
.
append
(
(
*
static
_cast
<
typelib_TypeDescriptionReference
*
const
*
>
(
val
)
)
->
pTypeName
);
break
;
...
...
comphelper/source/misc/types.cxx
Dosyayı görüntüle @
581c5075
...
...
@@ -167,7 +167,7 @@ template<class TYPE>
bool
tryCompare
(
const
void
*
_pData
,
const
Any
&
_rValue
,
bool
&
_bIdentical
,
TYPE
&
_rOut
)
{
bool
bSuccess
=
_rValue
>>=
_rOut
;
_bIdentical
=
bSuccess
&&
(
_rOut
==
*
reinterpret
_cast
<
const
TYPE
*>
(
_pData
));
_bIdentical
=
bSuccess
&&
(
_rOut
==
*
static
_cast
<
const
TYPE
*>
(
_pData
));
return
bSuccess
;
}
...
...
@@ -191,13 +191,13 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
// beides AnyWerte
if
(
_rValue
.
getValueType
().
getTypeClass
()
==
TypeClass_ANY
)
bRes
=
compare_impl
(
reinterpret
_cast
<
const
Any
*>
(
pData
)
->
getValueType
(),
reinterpret
_cast
<
const
Any
*>
(
pData
)
->
getValue
(),
*
reinterpret
_cast
<
const
Any
*>
(
_rValue
.
getValue
()));
static
_cast
<
const
Any
*>
(
pData
)
->
getValueType
(),
static
_cast
<
const
Any
*>
(
pData
)
->
getValue
(),
*
static
_cast
<
const
Any
*>
(
_rValue
.
getValue
()));
else
bRes
=
compare_impl
(
reinterpret
_cast
<
const
Any
*>
(
pData
)
->
getValueType
(),
reinterpret
_cast
<
const
Any
*>
(
pData
)
->
getValue
(),
static
_cast
<
const
Any
*>
(
pData
)
->
getValueType
(),
static
_cast
<
const
Any
*>
(
pData
)
->
getValue
(),
_rValue
);
}
else
if
(
(
_rType
.
getTypeClass
()
==
TypeClass_VOID
)
...
...
@@ -261,7 +261,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
{
sal_Int32
nAsInt32
=
0
;
bConversionSuccess
=
::
cppu
::
enum2int
(
nAsInt32
,
_rValue
);
bRes
=
bConversionSuccess
&&
(
nAsInt32
==
*
reinterpret
_cast
<
const
sal_Int32
*>
(
pData
));
bRes
=
bConversionSuccess
&&
(
nAsInt32
==
*
static
_cast
<
const
sal_Int32
*>
(
pData
));
break
;
}
case
TypeClass_LONG
:
...
...
@@ -327,7 +327,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
bConversionSuccess
=
_rValue
>>=
aTemp
;
if
(
bConversionSuccess
)
{
const
Sequence
<
sal_Int8
>&
rLeftSeq
=
*
reinterpret
_cast
<
const
Sequence
<
sal_Int8
>*>
(
pData
);
const
Sequence
<
sal_Int8
>&
rLeftSeq
=
*
static
_cast
<
const
Sequence
<
sal_Int8
>*>
(
pData
);
const
Sequence
<
sal_Int8
>&
rRightSeq
=
aTemp
;
bRes
=
rLeftSeq
.
getLength
()
==
rRightSeq
.
getLength
()
&&
memcmp
(
rLeftSeq
.
getConstArray
(),
rRightSeq
.
getConstArray
(),
rLeftSeq
.
getLength
())
==
0
;
...
...
@@ -339,7 +339,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
bConversionSuccess
=
_rValue
>>=
aTemp
;
if
(
bConversionSuccess
)
{
const
Sequence
<
sal_uInt8
>&
rLeftSeq
=
*
reinterpret
_cast
<
const
Sequence
<
sal_uInt8
>*>
(
pData
);
const
Sequence
<
sal_uInt8
>&
rLeftSeq
=
*
static
_cast
<
const
Sequence
<
sal_uInt8
>*>
(
pData
);
const
Sequence
<
sal_uInt8
>&
rRightSeq
=
aTemp
;
bRes
=
rLeftSeq
.
getLength
()
==
rRightSeq
.
getLength
()
&&
memcmp
(
rLeftSeq
.
getConstArray
(),
rRightSeq
.
getConstArray
(),
rLeftSeq
.
getLength
())
==
0
;
...
...
@@ -351,7 +351,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
bConversionSuccess
=
_rValue
>>=
aTemp
;
if
(
bConversionSuccess
)
{
const
Sequence
<
sal_Int16
>&
rLeftSeq
=
*
reinterpret
_cast
<
const
Sequence
<
sal_Int16
>*>
(
pData
);
const
Sequence
<
sal_Int16
>&
rLeftSeq
=
*
static
_cast
<
const
Sequence
<
sal_Int16
>*>
(
pData
);
const
Sequence
<
sal_Int16
>&
rRightSeq
=
aTemp
;
bRes
=
rLeftSeq
.
getLength
()
==
rRightSeq
.
getLength
()
&&
memcmp
(
rLeftSeq
.
getConstArray
(),
rRightSeq
.
getConstArray
(),
rLeftSeq
.
getLength
()
*
sizeof
(
sal_Int16
))
==
0
;
...
...
@@ -363,7 +363,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
bConversionSuccess
=
_rValue
>>=
aTemp
;
if
(
bConversionSuccess
)
{
const
Sequence
<
sal_uInt16
>&
rLeftSeq
=
*
reinterpret
_cast
<
const
Sequence
<
sal_uInt16
>*>
(
pData
);
const
Sequence
<
sal_uInt16
>&
rLeftSeq
=
*
static
_cast
<
const
Sequence
<
sal_uInt16
>*>
(
pData
);
const
Sequence
<
sal_uInt16
>&
rRightSeq
=
aTemp
;
bRes
=
rLeftSeq
.
getLength
()
==
rRightSeq
.
getLength
()
&&
memcmp
(
rLeftSeq
.
getConstArray
(),
rRightSeq
.
getConstArray
(),
rLeftSeq
.
getLength
()
*
sizeof
(
sal_uInt16
))
==
0
;
...
...
@@ -375,7 +375,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
bConversionSuccess
=
_rValue
>>=
aTemp
;
if
(
bConversionSuccess
)
{
const
Sequence
<
sal_Int32
>&
rLeftSeq
=
*
reinterpret
_cast
<
const
Sequence
<
sal_Int32
>*>
(
pData
);
const
Sequence
<
sal_Int32
>&
rLeftSeq
=
*
static
_cast
<
const
Sequence
<
sal_Int32
>*>
(
pData
);
const
Sequence
<
sal_Int32
>&
rRightSeq
=
aTemp
;
bRes
=
rLeftSeq
.
getLength
()
==
rRightSeq
.
getLength
()
&&
memcmp
(
rLeftSeq
.
getConstArray
(),
rRightSeq
.
getConstArray
(),
rLeftSeq
.
getLength
()
*
sizeof
(
sal_Int32
))
==
0
;
...
...
@@ -387,7 +387,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
bConversionSuccess
=
_rValue
>>=
aTemp
;
if
(
bConversionSuccess
)
{
const
Sequence
<
sal_uInt32
>&
rLeftSeq
=
*
reinterpret
_cast
<
const
Sequence
<
sal_uInt32
>*>
(
pData
);
const
Sequence
<
sal_uInt32
>&
rLeftSeq
=
*
static
_cast
<
const
Sequence
<
sal_uInt32
>*>
(
pData
);
const
Sequence
<
sal_uInt32
>&
rRightSeq
=
aTemp
;
bRes
=
rLeftSeq
.
getLength
()
==
rRightSeq
.
getLength
()
&&
memcmp
(
rLeftSeq
.
getConstArray
(),
rRightSeq
.
getConstArray
(),
rLeftSeq
.
getLength
()
*
sizeof
(
sal_uInt32
))
==
0
;
...
...
@@ -399,7 +399,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
bConversionSuccess
=
_rValue
>>=
aTemp
;
if
(
bConversionSuccess
)
{
const
Sequence
<
OUString
>&
rLeftSeq
=
*
reinterpret
_cast
<
const
Sequence
<
OUString
>*>
(
pData
);
const
Sequence
<
OUString
>&
rLeftSeq
=
*
static
_cast
<
const
Sequence
<
OUString
>*>
(
pData
);
const
Sequence
<
OUString
>&
rRightSeq
=
aTemp
;
sal_Int32
nSeqLen
=
rLeftSeq
.
getLength
();
bRes
=
(
nSeqLen
==
rRightSeq
.
getLength
()
);
...
...
comphelper/source/property/propertycontainerhelper.cxx
Dosyayı görüntüle @
581c5075
...
...
@@ -288,7 +288,7 @@ bool OPropertyContainerHelper::convertFastPropertyValue(
pPropContainer
=
&
(
*
aIter
);
}
else
pPropContainer
=
reinterpret
_cast
<
Any
*>
(
aPos
->
aLocation
.
pDerivedClassMember
);
pPropContainer
=
static
_cast
<
Any
*>
(
aPos
->
aLocation
.
pDerivedClassMember
);
// check if the new value differs from the current one
if
(
!
pPropContainer
->
hasValue
()
||
!
aNewRequestedValue
.
hasValue
())
...
...
@@ -386,7 +386,7 @@ bool OPropertyContainerHelper::setFastPropertyValue(sal_Int32 _nHandle, const An
break
;
case
PropertyDescription
:
:
ltDerivedClassAnyType
:
*
reinterpret
_cast
<
Any
*
>
(
aPos
->
aLocation
.
pDerivedClassMember
)
=
_rValue
;
*
static
_cast
<
Any
*
>
(
aPos
->
aLocation
.
pDerivedClassMember
)
=
_rValue
;
break
;
case
PropertyDescription
:
:
ltDerivedClassRealType
:
...
...
@@ -427,7 +427,7 @@ void OPropertyContainerHelper::getFastPropertyValue(Any& _rValue, sal_Int32 _nHa
_rValue
=
m_aHoldProperties
[
aPos
->
aLocation
.
nOwnClassVectorIndex
];
break
;
case
PropertyDescription
:
:
ltDerivedClassAnyType
:
_rValue
=
*
reinterpret
_cast
<
Any
*>
(
aPos
->
aLocation
.
pDerivedClassMember
);
_rValue
=
*
static
_cast
<
Any
*>
(
aPos
->
aLocation
.
pDerivedClassMember
);
break
;
case
PropertyDescription
:
:
ltDerivedClassRealType
:
_rValue
.
setValue
(
aPos
->
aLocation
.
pDerivedClassMember
,
aPos
->
aProperty
.
Type
);
...
...
include/comphelper/extract.hxx
Dosyayı görüntüle @
581c5075
...
...
@@ -57,7 +57,7 @@ inline bool SAL_CALL enum2int( sal_Int32 & rnEnum, const ::com::sun::star::uno::
{
if
(
rAny
.
getValueTypeClass
()
==
::
com
::
sun
::
star
::
uno
::
TypeClass_ENUM
)
{
rnEnum
=
*
reinterpret
_cast
<
const
int
*
>
(
rAny
.
getValue
()
);
rnEnum
=
*
static
_cast
<
const
int
*
>
(
rAny
.
getValue
()
);
return
true
;
}
...
...
include/comphelper/uno3.hxx
Dosyayı görüntüle @
581c5075
...
...
@@ -187,7 +187,7 @@ namespace comphelper
::
com
::
sun
::
star
::
uno
::
Any
aCheck
=
_rxAggregate
->
queryAggregation
(
cppu
::
UnoType
<
iface
>::
get
());
if
(
aCheck
.
hasValue
())
_rxOut
=
*
reinterpret
_cast
<
const
::
com
::
sun
::
star
::
uno
::
Reference
<
iface
>*>
(
aCheck
.
getValue
());
_rxOut
=
*
static
_cast
<
const
::
com
::
sun
::
star
::
uno
::
Reference
<
iface
>*>
(
aCheck
.
getValue
());
}
return
_rxOut
.
is
();
}
...
...
@@ -208,7 +208,7 @@ namespace comphelper
cppu
::
UnoType
<
iface
>::
get
());
if
(
aCheck
.
hasValue
())
{
_rxOut
=
*
reinterpret
_cast
<
const
::
com
::
sun
::
star
::
uno
::
Reference
<
iface
>*>
(
aCheck
.
getValue
());
_rxOut
=
*
static
_cast
<
const
::
com
::
sun
::
star
::
uno
::
Reference
<
iface
>*>
(
aCheck
.
getValue
());
return
_rxOut
.
is
();
}
}
...
...
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