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
aaeba64f
Kaydet (Commit)
aaeba64f
authored
Ara 10, 2012
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
-Werror,-Wtautological-constant-out-of-range-compare
Change-Id: I4356413b23fdbaaa1bf2e94ad7aed3ceed1f9261
üst
72c2f30c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
unoexceptionprotector.cxx
...ource/cpp/unoexceptionprotector/unoexceptionprotector.cxx
+4
-6
No files found.
unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx
Dosyayı görüntüle @
aaeba64f
...
@@ -17,11 +17,11 @@
...
@@ -17,11 +17,11 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
*/
#include <limits>
#include <string>
#include <string>
#include <iostream>
#include <iostream>
#include "boost/noncopyable.hpp"
#include "boost/noncopyable.hpp"
#include "boost/static_assert.hpp"
#include "com/sun/star/uno/Any.hxx"
#include "com/sun/star/uno/Any.hxx"
#include "com/sun/star/uno/Exception.hpp"
#include "com/sun/star/uno/Exception.hpp"
#include "cppuhelper/exc_hlp.hxx"
#include "cppuhelper/exc_hlp.hxx"
...
@@ -39,12 +39,10 @@ namespace {
...
@@ -39,12 +39,10 @@ namespace {
// Best effort conversion:
// Best effort conversion:
std
::
string
convert
(
rtl
::
OUString
const
&
s16
)
{
std
::
string
convert
(
rtl
::
OUString
const
&
s16
)
{
rtl
::
OString
s8
(
rtl
::
OUStringToOString
(
s16
,
osl_getThreadTextEncoding
()));
rtl
::
OString
s8
(
rtl
::
OUStringToOString
(
s16
,
osl_getThreadTextEncoding
()));
BOOST_STATIC_ASSERT
(
sizeof
(
sal_Int32
)
<=
sizeof
(
std
::
string
::
size_type
));
// ensure following cast is legitimate
return
std
::
string
(
return
std
::
string
(
s8
.
getStr
(),
s8
.
getStr
(),
static_cast
<
std
::
string
::
size_type
>
(
s8
.
getLength
()));
((
static_cast
<
sal_uInt32
>
(
s8
.
getLength
())
>
std
::
numeric_limits
<
std
::
string
::
size_type
>::
max
())
?
std
::
numeric_limits
<
std
::
string
::
size_type
>::
max
()
:
static_cast
<
std
::
string
::
size_type
>
(
s8
.
getLength
())));
}
}
class
Prot
:
public
CppUnit
::
Protector
,
private
boost
::
noncopyable
class
Prot
:
public
CppUnit
::
Protector
,
private
boost
::
noncopyable
...
...
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