[Libreoffice-commits] core.git: 2 commits - sal/rtl sc/source

Caolán McNamara caolanm at redhat.com
Mon Feb 20 09:45:47 UTC 2017


 sal/rtl/alloc_cache.cxx      |    4 +++-
 sc/source/ui/src/scfuncs.src |   11 +++++------
 2 files changed, 8 insertions(+), 7 deletions(-)

New commits:
commit 03eb939856a73fed6bbf3850d7dc4d58594a7d98
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Feb 20 09:44:43 2017 +0000

    update .src comment for stringarray conversion
    
    Change-Id: Ib4518ea46acb37d97c9739ee11b6cf9777f99194

diff --git a/sc/source/ui/src/scfuncs.src b/sc/source/ui/src/scfuncs.src
index ed205af..7c43b8a 100644
--- a/sc/source/ui/src/scfuncs.src
+++ b/sc/source/ui/src/scfuncs.src
@@ -19,13 +19,12 @@
 
 /* Resource file for the function wizard / autopilot.
  *
- *  For every function there is a sub resource with the number of the OpCode of
- *  the function.
+ *  For every function there is a StringArray with a resource id (offset by
+ *  RID_SC_FUNC_DESCRIPTIONS_START) with the OpCode of the function
  *
- *      In this sub resource, with index 1 the description of the function is
- *      given, followed by two string resources for each parameter,
- *      first the type or name of the parameter, second a description of the
- *      parameter.
+ *  In this stringarray, the description of the function is given as the first
+ *  entry, followed by two entries for each parameter, first the type or name
+ *  of the parameter, second a description of the parameter.
  */
 
 #include "scfuncs.hrc"
commit 234bc82308b00d315360073f1316700fa688a38f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Feb 20 08:56:17 2017 +0000

    silence coverity#1202740 Bad bit shift operation
    
    Change-Id: I88c38a1a7eae0d1e2011c40983490efef1ff6438

diff --git a/sal/rtl/alloc_cache.cxx b/sal/rtl/alloc_cache.cxx
index fd8a8c0..1529626 100644
--- a/sal/rtl/alloc_cache.cxx
+++ b/sal/rtl/alloc_cache.cxx
@@ -130,7 +130,9 @@ rtl_cache_hash_rescale (
 
         cache->m_hash_table = new_table;
         cache->m_hash_size  = new_size;
-        cache->m_hash_shift = highbit(cache->m_hash_size) - 1;
+        const auto bit = highbit(cache->m_hash_size);
+        assert(bit > 0);
+        cache->m_hash_shift = bit - 1;
 
         for (i = 0; i < old_size; i++)
         {


More information about the Libreoffice-commits mailing list