summaryrefslogtreecommitdiffstats
path: root/stoc/source
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-07-23 22:58:49 +0200
committerMichael Stahl <mstahl@redhat.com>2014-07-24 00:34:49 +0200
commit1d36d91d0a1814ba209e683f74658a92e167a73f (patch)
tree4ef94cb9cea101bb50988ad83838a1bf8310d578 /stoc/source
parentremove some unused headers from svgfilter.hxx (diff)
downloadcore-1d36d91d0a1814ba209e683f74658a92e167a73f.tar.gz
core-1d36d91d0a1814ba209e683f74658a92e167a73f.zip
use BOOST_STATIC_ASSERT for sizeof check
Change-Id: Iad00aa47ef65fe163eff407549c26eb3590ab132
Diffstat (limited to 'stoc/source')
-rw-r--r--stoc/source/javaloader/javaloader.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/stoc/source/javaloader/javaloader.cxx b/stoc/source/javaloader/javaloader.cxx
index 335356ad39d5..477ffa5c90fd 100644
--- a/stoc/source/javaloader/javaloader.cxx
+++ b/stoc/source/javaloader/javaloader.cxx
@@ -18,6 +18,9 @@
*/
#include <cstdarg>
+
+#include <boost/static_assert.hpp>
+
#include <osl/diagnose.h>
#include <osl/process.h>
@@ -155,9 +158,8 @@ const css::uno::Reference<XImplementationLoader> & JavaComponentLoader::getJavaL
// as long as our reference to the XJavaVM service lasts), and
// convert the non-refcounted pointer into a refcounted one
// immediately:
- OSL_ENSURE(sizeof (sal_Int64)
- >= sizeof (jvmaccess::UnoVirtualMachine *),
- "Pointer cannot be represented as sal_Int64");
+ BOOST_STATIC_ASSERT(sizeof (sal_Int64)
+ >= sizeof (jvmaccess::UnoVirtualMachine *));
sal_Int64 nPointer = reinterpret_cast< sal_Int64 >(
static_cast< jvmaccess::UnoVirtualMachine * >(0));
javaVM_xJavaVM->getJavaVM(processID) >>= nPointer;