summaryrefslogtreecommitdiff
path: root/include/o3tl/strong_int.hxx
AgeCommit message (Collapse)Author
2021-01-02introduce Degree100 strong_int typeNoel
Change-Id: I78f837a1340be0ca5c49097f543a481b7b43a632 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108367 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-21new tools::Degree10 strong typedefNoel Grandin
partly to flush some use of "long" out the codebase, but also to make it obvious which units are being used for angle values. Change-Id: I1dc22494ca42c4677a63f685d5903f2b89886dc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104548 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-07HAVE_CXX14_CONSTEXPR is always true nowStephan Bergmann
...but for safety, leave the configure.ac check in for some longer. o3tl::array_view::max_size (include/o3tl/array_view.hxx) and o3tl::basic_string_view::max_size (include/o3tl/string_view.hxx) started to produce loplugin:staticmethods warnings, which I silenced by /not/ making the functions static. Those classes are meant to be temporary drop-in replacements for standard classes (std::span slated for C++20, prev. std::array_view; and std::basic_string_view, resp.), so should have the same behavior as their standard counterparts (and making the functions static would likely cause loplugin:staticaccess warnings at call sites). Change-Id: If21674dbf02886f453ca447544e37b184df5a25e Reviewed-on: https://gerrit.libreoffice.org/64768 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-06-04o3tl: add more strong_int operatorsMichael Stahl
Change-Id: Ibb0f883353b6d172275744eaa59d27ba39930623 Reviewed-on: https://gerrit.libreoffice.org/55264 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-05-25no need declare these tag structs separatelyNoel Grandin
Change-Id: I00f336ee4eced431155c79bee6e2373e145ae95c Reviewed-on: https://gerrit.libreoffice.org/54780 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-19Remove include of config_global.h from sal/config.hStephan Bergmann
(where it is not actually needed), and instead include it where needed Change-Id: I107f8d4002d3001393b89834dd30a30b0c53a792 Reviewed-on: https://gerrit.libreoffice.org/48152 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-06-06coverity#1409892 silence Operands don't affect resultCaolán McNamara
Change-Id: I283701880ea9e0a8485ef131afc93438c77451e1
2017-05-29coverity#1409892 silence Operands don't affect resultCaolán McNamara
this might work to make this appear deliberate to coverity Change-Id: Iad11e72feb154991b04cfb5960bd06d33c6b96a0 Reviewed-on: https://gerrit.libreoffice.org/38116 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-16Blind fix for MSVC 2017 warning C4018: '>=': signed/unsigned mismatchStephan Bergmann
...and get rid of the arbitrary, bogus 'long' strong_int ctor parameter type Change-Id: If71f4d3993e984b4089b74ff96dce75c68a6cf77 Reviewed-on: https://gerrit.libreoffice.org/37665 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-05-14catch out of range values in strong_int constructorNoel Grandin
Change-Id: Ibcbb873fda6cb82ad8f575673705ba6cb16217e6 Reviewed-on: https://gerrit.libreoffice.org/37533 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-26use strong_int for LanguageTypeNoel Grandin
Change-Id: If99a944f7032180355da291ad283b4cfcea4f448 Reviewed-on: https://gerrit.libreoffice.org/36629 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-27create SfxInterfaceId o3tl::strong_intNoel Grandin
Change-Id: Ie52f63382a9fb36f9a472801be012b140bfb51f6 Reviewed-on: https://gerrit.libreoffice.org/35722 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-25Fix typosAndrea Gelmini
Change-Id: I998e9b2ad8ebdcc983239192cb61f6689e378ad9 Reviewed-on: https://gerrit.libreoffice.org/35633 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-22Use consistent include guard macro namesTor Lillqvist
Change-Id: Icc83a9a1257e422aa7593d6a8dd5af25a06a3384
2017-03-14make o3tl::strong_int constructor explicitNoel Grandin
Could have sworn I did this originally, somehow it got lost. Also fix a thinko in tools::ResId I introduced in commit 2b70fb58be039fbd05ea833a40b1b3e9f922e45c "Use o3tl::strong_int on RESOURCE_TYPE" Change-Id: Id3b39962255297010cd1feaaca6d822168311081 Reviewed-on: https://gerrit.libreoffice.org/35108 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-22Revert "Fix typos"jan iversen
This reverts commit ffd7f8fcfc2b551509e9cb31c0920e0f64292ea7. Caused some problems, need to be broken down. Change-Id: Iee816a266c32e7cebe623d36300c13d079e77c52 Reviewed-on: https://gerrit.libreoffice.org/34534 Reviewed-by: jan iversen <jani@libreoffice.org> Tested-by: jan iversen <jani@libreoffice.org>
2017-02-22Fix typosAndrea Gelmini
Change-Id: I61764094dd6f8e13f29ca554373d30d1d5def447 Reviewed-on: https://gerrit.libreoffice.org/34476 Reviewed-by: jan iversen <jani@libreoffice.org> Tested-by: jan iversen <jani@libreoffice.org>
2017-02-13create strong_int template and use it in tools::UniqueIndexNoel Grandin
an experiment to see how useful a strong_int template works out Change-Id: Ib77700350f0fa3b018a1926233adf7a40d728d16 Reviewed-on: https://gerrit.libreoffice.org/34072 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>