Kaydet (Commit) e93f4d9e authored tarafından Stephan Bergmann's avatar Stephan Bergmann

trunc is C99 only (thus not C++03)

Change-Id: Ia045472386c82369206bfb06dbc8f7a5bde60510
üst a27100f4
...@@ -153,7 +153,7 @@ void DebugEventInjector::InjectTextEvent() ...@@ -153,7 +153,7 @@ void DebugEventInjector::InjectTextEvent()
}; };
size_t i = getRandom() * SAL_N_ELEMENTS( nTextCodes ); 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.mnCode = nTextCodes[i].nCodeStart + offset;
aKeyEvent.mnCharCode = nTextCodes[i].aCharStart + offset; aKeyEvent.mnCharCode = nTextCodes[i].aCharStart + offset;
// fprintf( stderr, "Char '%c' offset %d into record %d base '%c'\n", // fprintf( stderr, "Char '%c' offset %d into record %d base '%c'\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment