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
eea5ad99
Kaydet (Commit)
eea5ad99
authored
Nis 21, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
cppcheck: redundantCopy
Change-Id: I209b55a6ef962d4a350327e56c4d16c8180a21e0
üst
7e1d81cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
rtl_ustr.cxx
sal/qa/rtl/oustring/rtl_ustr.cxx
+3
-3
No files found.
sal/qa/rtl/oustring/rtl_ustr.cxx
Dosyayı görüntüle @
eea5ad99
...
@@ -518,8 +518,8 @@ namespace rtl_ustr
...
@@ -518,8 +518,8 @@ namespace rtl_ustr
sal_uInt32
nLength
=
aStr1
.
getLength
()
*
sizeof
(
sal_Unicode
);
sal_uInt32
nLength
=
aStr1
.
getLength
()
*
sizeof
(
sal_Unicode
);
sal_Unicode
*
pStr
=
(
sal_Unicode
*
)
malloc
(
nLength
+
sizeof
(
sal_Unicode
));
// length + 1 (null terminator)
sal_Unicode
*
pStr
=
(
sal_Unicode
*
)
malloc
(
nLength
+
sizeof
(
sal_Unicode
));
// length + 1 (null terminator)
CPPUNIT_ASSERT_MESSAGE
(
"can't get memory for test"
,
pStr
!=
NULL
);
CPPUNIT_ASSERT_MESSAGE
(
"can't get memory for test"
,
pStr
!=
NULL
);
memset
(
pStr
,
0
,
nLength
+
sizeof
(
sal_Unicode
));
memcpy
(
pStr
,
aStr1
.
getStr
(),
nLength
);
memcpy
(
pStr
,
aStr1
.
getStr
(),
nLength
);
pStr
[
aStr1
.
getLength
()]
=
0
;
rtl_ustr_replaceChar
(
pStr
,
'e'
,
'u'
);
rtl_ustr_replaceChar
(
pStr
,
'e'
,
'u'
);
rtl
::
OUString
suStr
(
pStr
,
aStr1
.
getLength
());
rtl
::
OUString
suStr
(
pStr
,
aStr1
.
getLength
());
...
@@ -614,8 +614,8 @@ namespace rtl_ustr
...
@@ -614,8 +614,8 @@ namespace rtl_ustr
sal_uInt32
nLength
=
aStr1
.
getLength
()
*
sizeof
(
sal_Unicode
);
sal_uInt32
nLength
=
aStr1
.
getLength
()
*
sizeof
(
sal_Unicode
);
sal_Unicode
*
pStr
=
(
sal_Unicode
*
)
malloc
(
nLength
+
sizeof
(
sal_Unicode
)
);
// we need to add '\0' so one more
sal_Unicode
*
pStr
=
(
sal_Unicode
*
)
malloc
(
nLength
+
sizeof
(
sal_Unicode
)
);
// we need to add '\0' so one more
CPPUNIT_ASSERT_MESSAGE
(
"can't get memory for test"
,
pStr
!=
NULL
);
CPPUNIT_ASSERT_MESSAGE
(
"can't get memory for test"
,
pStr
!=
NULL
);
memset
(
pStr
,
0
,
nLength
+
sizeof
(
sal_Unicode
));
// empty the sal_Unicode array
memcpy
(
pStr
,
aStr1
.
getStr
(),
nLength
);
memcpy
(
pStr
,
aStr1
.
getStr
(),
nLength
);
pStr
[
aStr1
.
getLength
()]
=
0
;
rtl_ustr_toAsciiLowerCase
(
pStr
);
rtl_ustr_toAsciiLowerCase
(
pStr
);
rtl
::
OUString
suStr
(
pStr
,
aStr1
.
getLength
());
rtl
::
OUString
suStr
(
pStr
,
aStr1
.
getLength
());
...
@@ -693,8 +693,8 @@ namespace rtl_ustr
...
@@ -693,8 +693,8 @@ namespace rtl_ustr
sal_uInt32
nLength
=
aStr1
.
getLength
()
*
sizeof
(
sal_Unicode
);
sal_uInt32
nLength
=
aStr1
.
getLength
()
*
sizeof
(
sal_Unicode
);
sal_Unicode
*
pStr
=
(
sal_Unicode
*
)
malloc
(
nLength
+
sizeof
(
sal_Unicode
));
// length + null terminator
sal_Unicode
*
pStr
=
(
sal_Unicode
*
)
malloc
(
nLength
+
sizeof
(
sal_Unicode
));
// length + null terminator
CPPUNIT_ASSERT_MESSAGE
(
"can't get memory for test"
,
pStr
!=
NULL
);
CPPUNIT_ASSERT_MESSAGE
(
"can't get memory for test"
,
pStr
!=
NULL
);
memset
(
pStr
,
0
,
nLength
+
sizeof
(
sal_Unicode
));
memcpy
(
pStr
,
aStr1
.
getStr
(),
nLength
);
memcpy
(
pStr
,
aStr1
.
getStr
(),
nLength
);
pStr
[
aStr1
.
getLength
()]
=
0
;
rtl_ustr_toAsciiUpperCase
(
pStr
);
rtl_ustr_toAsciiUpperCase
(
pStr
);
rtl
::
OUString
suStr
(
pStr
,
aStr1
.
getLength
());
rtl
::
OUString
suStr
(
pStr
,
aStr1
.
getLength
());
...
...
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