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
0fbe22a7
Kaydet (Commit)
0fbe22a7
authored
Haz 06, 2016
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
css::uno::Any move semantics (for LIBO_INTERNAL_ONLY)
Change-Id: Ib582a744321e0f209395651ac2edffe30152ffba
üst
1bf3cafd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
0 deletions
+38
-0
Any.h
include/com/sun/star/uno/Any.h
+5
-0
Any.hxx
include/com/sun/star/uno/Any.hxx
+33
-0
No files found.
include/com/sun/star/uno/Any.h
Dosyayı görüntüle @
0fbe22a7
...
@@ -135,6 +135,11 @@ public:
...
@@ -135,6 +135,11 @@ public:
*/
*/
inline
Any
&
SAL_CALL
operator
=
(
const
Any
&
rAny
);
inline
Any
&
SAL_CALL
operator
=
(
const
Any
&
rAny
);
#if defined LIBO_INTERNAL_ONLY
inline
Any
(
Any
&&
other
);
inline
Any
&
operator
=
(
Any
&&
other
);
#endif
/** Gets the type of the set value.
/** Gets the type of the set value.
@return a Type object of the set value
@return a Type object of the set value
...
...
include/com/sun/star/uno/Any.hxx
Dosyayı görüntüle @
0fbe22a7
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include <sal/config.h>
#include <sal/config.h>
#include <algorithm>
#include <cassert>
#include <cassert>
#include <cstddef>
#include <cstddef>
#include <iomanip>
#include <iomanip>
...
@@ -120,6 +121,38 @@ inline Any & Any::operator = ( const Any & rAny )
...
@@ -120,6 +121,38 @@ inline Any & Any::operator = ( const Any & rAny )
return
*
this
;
return
*
this
;
}
}
#if defined LIBO_INTERNAL_ONLY
namespace
detail
{
inline
void
moveAnyInternals
(
Any
&
from
,
Any
&
to
)
{
uno_any_construct
(
&
to
,
nullptr
,
nullptr
,
&
cpp_acquire
);
std
::
swap
(
from
.
pType
,
to
.
pType
);
std
::
swap
(
from
.
pData
,
to
.
pData
);
std
::
swap
(
from
.
pReserved
,
to
.
pReserved
);
if
(
to
.
pData
==
&
from
.
pReserved
)
{
to
.
pData
=
&
to
.
pReserved
;
}
// This leaves to.pData (where "to" is now VOID) dangling to somewhere (cf.
// CONSTRUCT_EMPTY_ANY, cppu/source/uno/prim.hxx), but what's relevant is
// only that it isn't a nullptr (as e.g. >>= -> uno_type_assignData ->
// _assignData takes a null pSource to mean "construct a default value").
}
}
Any
::
Any
(
Any
&&
other
)
{
detail
::
moveAnyInternals
(
other
,
*
this
);
}
Any
&
Any
::
operator
=
(
Any
&&
other
)
{
uno_any_destruct
(
this
,
&
cpp_release
);
detail
::
moveAnyInternals
(
other
,
*
this
);
return
*
this
;
}
#endif
inline
::
rtl
::
OUString
Any
::
getValueTypeName
()
const
inline
::
rtl
::
OUString
Any
::
getValueTypeName
()
const
{
{
return
::
rtl
::
OUString
(
pType
->
pTypeName
);
return
::
rtl
::
OUString
(
pType
->
pTypeName
);
...
...
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