[Libreoffice-commits] core.git: vcl/source

Stephan Bergmann sbergman at redhat.com
Thu May 22 02:15:14 PDT 2014


 vcl/source/window/debugevent.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e93f4d9e431b610f398db60f2c4957803000ccf9
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu May 22 11:14:03 2014 +0200

    trunc is C99 only (thus not C++03)
    
    Change-Id: Ia045472386c82369206bfb06dbc8f7a5bde60510

diff --git a/vcl/source/window/debugevent.cxx b/vcl/source/window/debugevent.cxx
index 373001c..0f5e61e 100644
--- a/vcl/source/window/debugevent.cxx
+++ b/vcl/source/window/debugevent.cxx
@@ -153,7 +153,7 @@ void DebugEventInjector::InjectTextEvent()
         };
 
         size_t i = getRandom() * SAL_N_ELEMENTS( nTextCodes );
-        int offset = trunc( getRandom() * ( nTextCodes[i].nCodeEnd - nTextCodes[i].nCodeStart ) );
+        int offset = int( getRandom() * ( nTextCodes[i].nCodeEnd - nTextCodes[i].nCodeStart ) );
         aKeyEvent.mnCode = nTextCodes[i].nCodeStart + offset;
         aKeyEvent.mnCharCode = nTextCodes[i].aCharStart + offset;
 //        fprintf( stderr, "Char '%c' offset %d into record %d base '%c'\n",


More information about the Libreoffice-commits mailing list