[Libreoffice-commits] core.git: sw/inc sw/source

Tor Lillqvist tml at collabora.com
Mon May 4 03:35:33 PDT 2015


 sw/inc/docary.hxx              |    3 +--
 sw/source/ui/frmdlg/column.cxx |    2 ++
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit a441d5fbe59436089e5f7b882a3482212c9ee208
Author: Tor Lillqvist <tml at collabora.com>
Date:   Mon May 4 13:25:38 2015 +0300

    Include <cstdint> early to be sure to get SIZE_MAX
    
    Turns out that at least with the glibc version I have on openSUSE 12.3,
    whether <stdint.h> defines SIZE_MAX and friends or not depends on whether
    __STDC_LIMIT_MACROS is defined, and that gets defined (in our case) only when
    <stdint.h> gets included through some boost include file, or through
    <cstdint>. In the case of this compilation unit, apparently <stdint.h> gets
    included directly somewhere before SIZE_MAX is used in sw/inc/docary.hxx.
    
    Possibly a better fix would be to make sure we include <cstdint> everywhere
    and not <stdint.h>. That wouldn't help in case it is through some 3rd-party C
    library include file that the <stdint.h> gets included, though.
    
    This reverts commit 8e6527a97bc6f05c5db9f0485089b5cde97531fe
    
    Change-Id: I200985ee70eaf90fc3fa9341fdf9d657750e49ee

diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx
index 45c485a..386bf51 100644
--- a/sw/inc/docary.hxx
+++ b/sw/inc/docary.hxx
@@ -23,7 +23,6 @@
 #include <vector>
 #include <set>
 #include <algorithm>
-#include <sal/types.h>
 #include <o3tl/sorted_vector.hxx>
 
 class SwRangeRedline;
@@ -103,7 +102,7 @@ public:
     size_t GetPos(Value const& p) const
     {
         const_iterator const it = std::find(begin(), end(), p);
-        return it == end() ? SAL_MAX_SIZE : it - begin();
+        return it == end() ? SIZE_MAX : it - begin();
     }
 
     bool Contains(Value const& p) const
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index ff77810..bada3de 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <cstdint>
+
 #include "column.hxx"
 
 #include "hintids.hxx"


More information about the Libreoffice-commits mailing list