summaryrefslogtreecommitdiff
path: root/include/o3tl
AgeCommit message (Collapse)Author
2016-02-08loplugin:unusedmethodsNoel Grandin
using an idea from dtardon: <dtardon> noelgrandin, hi. could you try to run the unusedmethods clang plugin with "make build-nocheck"? that would catch functions that are only used in tests. e.g., i just removed the whole o3tl::range class, which has not been used in many years, but htere was a test for it... <noelgrandin> dtardon, interesting idea! Sure, I can do that. Change-Id: I5653953a426a2186a1e43017212d87ffce520387 Reviewed-on: https://gerrit.libreoffice.org/22041 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-29remove unused o3tl::rangeDavid Tardon
Change-Id: I080f4f2cb15d25ecf5545300da422957f24e3f9b
2016-01-29remove unneeded sal/config.hDavid Tardon
Change-Id: I7c8f06574053706f925df773aefc32407312c4dd
2016-01-26vcl: replace boost::shared_array with std::shared_ptrMichael Stahl
Add o3tl::make_shared_array() to create the shared_ptr with the right deleter. The main difference then is that shared_array has operator[], but this code didn't even use it. Change-Id: I500ffc2f92b99c2a3924c0cdcdaa101956b69add
2016-01-19Make enumarray_iterator adhere to iterator requirementsStephan Bergmann
...or else using it with GCC 6 libstdc++ std::find causes compilation failures Change-Id: I95e674922348f72fab6da8f049b2b4fcbdc74d07
2016-01-13remove unused o3tl/ptr_container.hxxMichael Stahl
Change-Id: I8132958b979add35bdd7aea52ce8788f3cdcbe51
2016-01-10Fix typosAndrea Gelmini
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-06std::swap is in <utility>, not <algorithm>Stephan Bergmann
Change-Id: I8b93f053276ff273f2f79ed29d7605d976f7d866
2015-11-05BOOST_ASSERT->assertNoel Grandin
Change-Id: Ifbb80c90f8530ebf4660493447c2c076587bebd6 Reviewed-on: https://gerrit.libreoffice.org/19795 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-12Replace "SAL_FINAL" with "final" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: Ifa5ba21308e32df44571fa2941370f2f11179580
2015-09-30Fix typosAndrea Gelmini
Change-Id: I6dfb5fb468c1305a8f248bf5788c5760135fd835 Reviewed-on: https://gerrit.libreoffice.org/18955 Reviewed-by: Oliver Specht <oliver.specht@cib.de> Tested-by: Oliver Specht <oliver.specht@cib.de>
2015-09-30Avoid unhelpful -Wunused-variableStephan Bergmann
...at least from "g++ (GCC) 5.1.1 20150618 (Red Hat 5.1.1-4)" with --disable-debug, when a namespace-scope const variable with a "complex" initializer declared in an include file remains unused. Avoid that warning via SAL_CONSTEXPR, which in turn requires large parts of o3tl::is_typed_flags to be SAL_CONSTEXPR, which in turn requires a new HAVE_CXX14_CONSTEXPR to allow assert in constexpr functions, which in turn requires using -std=c++14 instead of -std=c++11 where available, which in turn (a) requires to /not/ use -std=c++14 if it would run into a bug between Clang and libstdc++ discussed at <https://llvm.org/bugs/show_bug.cgi?id=24115> "llvm-nm fails to build with gcc 5.1's libstdc++" (and which hits us in sfx2/source/control/thumbnailview.cxx), and (b) requires a new HAVE_CXX14_SIZED_DEALLOCATION to work around GCC 5.1 -Werror=sized-deallocation (where Clang >= 3.7 only supports C++14 sized deallocation when explictly enabled via -fsized-deallocation, btw). This effectively reverts ff6462e6307e6924dc6c8178043ae9032f4b4152 "avoid unused variable warning:" again. Change-Id: I424e3561452a3e6d8c8a9604d6c737cab49840c4 Reviewed-on: https://gerrit.libreoffice.org/18918 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2015-09-16Remove unnecessary typedef from previous attempt againStephan Bergmann
Change-Id: Ic3e5c4aef4235124069035daadfb53ff3a1368a5
2015-09-15Fix binary ops with two o3tl::type_flags<E>::Wrap paramsStephan Bergmann
(the original ones would never have been picked due to how template argument deduction works) Change-Id: I5a08c763d721d8e11b5a10af2344a6a24bb0b9b2 Reviewed-on: https://gerrit.libreoffice.org/18583 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2015-08-30loplugin:simplifyboolStephan Bergmann
Change-Id: I5bfc2a84cef68421757e9aa8f5e4bcb1d6caf7bf
2015-08-29o3tl/cow_wrapper: remove boost dependencyDaniel Robertson
Remove boost dependencies from ::o3tl::cow_wrapper, and add the necessary includes to files including checked_delete and noncopyable that do not already include the necessary files. Change-Id: Iedae4232002792724226829a5d5cf9d16ffd0686 Reviewed-on: https://gerrit.libreoffice.org/18125 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-08-29o3tl: add another unit test to cow_wrapperDaniel Robertson
Add unit tests to cow_wrapper for the move ctor and move assignment. Change-Id: I82a5886ca7ae110985c7202125699cf95b6466d8 Reviewed-on: https://gerrit.libreoffice.org/18108 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-08-26Revert "create a macro to tidy up the declaration sites of ↵Noel Grandin
o3tl::typed_flags_set" sberg did not like this macro, let's see if I can find a better solution. This reverts commit e51fa143587d018b75db08e60cf27ff932b1cf8d.
2015-08-19o3tl: cow_wrapper add move constructor/assignmentDaniel Robertson
Add a move constructor and move assignment operator for o3tl::cow_wrapper. Insubstantial gains for UnsafeRefCountingPolicy, no atomic increment needed for ThreadSafeRefCountingPolicy's move-ctor. Change-Id: Ia2de1ca78b1e0e5a0f30535e752f1dd858fdfef0 Reviewed-on: https://gerrit.libreoffice.org/17848 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-08-17o3tl: rename compat_functional headerThorsten Behrens
After the cleanup, the stuff there really stands on its own (and the remaining usage of select1st/2nd is more descriptive than lambdas). Change-Id: I0aba131d5dc550189f8130d167dc94167e404540 Reviewed-on: https://gerrit.libreoffice.org/17806 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-08-17o3tl: remove unused codeThorsten Behrens
Change-Id: Ia7bcb590ab5b535af8cacead1e8afd735c463aaf Reviewed-on: https://gerrit.libreoffice.org/17805 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-08-13tdf#92459 basebmp: replace project2ndDaniel Robertson
Replace the use of project2nd in basebmp with a specialized functor similar to what is seen in paletteformats.hxx and pixelformatadapters.hxx. There should be no side effects due to this change. Change-Id: I1bbd723931e41986542e92bac773bbea68cfe5bd Reviewed-on: https://gerrit.libreoffice.org/17660 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-11tdf#92459 o3tl: remove unary_functionDaniel Robertson
Clean up o3tl/compat_functional.hxx select1st/select2nd. Remove the structs inheritance from the now deprecated unary_function. Remove project1st, as it is not used. Change-Id: I60c0f30c4b87417a331a4b38f62993cc3d1c9a51 Reviewed-on: https://gerrit.libreoffice.org/17625 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-07-30add assert for valid value in o3tl::typed_flags_setNoel Grandin
, fixing a couple of bugs in the process Change-Id: I40f932deecbcc99dff9aa13dd1882c7487e7fa8e Reviewed-on: https://gerrit.libreoffice.org/17411 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-24LRU map (cache) implementation to o3tl + testsTomaž Vajngerl
Change-Id: I6b1a39918e6c8c67712be2c8e9907266dcfefedb
2015-07-15create a macro to tidy up the declaration sites of o3tl::typed_flags_setNoel Grandin
Change-Id: Ifb8fd4fd5128188420f1dfda6b6f695160d5e77a Reviewed-on: https://gerrit.libreoffice.org/15865 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-07-10do not include boost/utility.hppMichael Stahl
It just includes a bunch of other boost headers; mostly we need boost/noncopyable.hpp so include that directly. This eliminates 831 MB(!) of boost/preprocessor/seq/fold_left.hpp completely, which is the 2nd biggest header after ustring.hxx. Change-Id: I3df55770adcb46e56f389af828e8ba80da2dc1f2
2015-06-26Remove workarounds for no longer supported GCC 4.6Stephan Bergmann
In bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx, the #if also covered Clang, which actually needs these declarations (for now; the right fix will probably be to #include <cxxabi.h>). Change-Id: I1eebd59e2371f3498d740ab78244927358c4f23f
2015-05-21o3tl: add make_unique template till we can't use std::make_uniqueMiklos Vajna
Change-Id: I48b26f0199e339badf7a0e2bed322ca701689d13 Reviewed-on: https://gerrit.libreoffice.org/15846 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-05-09Fix ICEs in gcc 4.6.3 for small-int typed_flags.Thorsten Behrens
Subtle failures in nested template instantiations there, for sal_{u}Int8 and sal_{u}Int16 - use wide-int fallback to do bitmask ops. Type is not used to store any dynamic values. This partially reverts a1ecce3ad7df6a82191c4956cec986dc50503dde Change-Id: Ifa7070c1c3830fd70d7ced082d651411ff523444
2015-05-09Revert "improve fallback behaviour of underlying_type for old gcc"Thorsten Behrens
This reverts commit 7ad4e562b462af22a1c29c955293238cdb30267b, which was causing ICEs on precisely the compiler versions it was targetted at. Change-Id: I996792d723a8bd0d7edd5f248d74217322b5ce3f
2015-05-07improve fallback behaviour of underlying_type for old gccChristoph Lutz
The fix fbd85c25b is not sufficient to build with an old GCC 4.6. The problem was, that underlying_type returned an int as default value for GCC 4.6 and int allows negative values that are forbidden in typed_flags_set. Changed it to alternative solution suggested in http://stackoverflow.com/questions/26148192/underlying-type-of-a-c-enum-in-c03 Change-Id: I20f44b8cef9c692efb583971bd251f1c34c289ab Reviewed-on: https://gerrit.libreoffice.org/15663 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
2015-04-29enumarray_iterator should not have a deleted copy assignment opStephan Bergmann
Change-Id: I1e5f8dcfe0801eca10622eefab43b674b6b3e956
2015-04-29convert STR_EVENT constants to scoped enumNoel Grandin
- also add needed infrastructure to o3tl::enumarray so we can use std::find on it - move the Impl inside the .cxx file, no need to expose it in the header Change-Id: I7758a6175849f46723d97b1e657f846524c3b7cd
2015-04-24loplugin:simplifyboolStephan Bergmann
Change-Id: I981d5a77cfe74ef81b235963820151cbea55370c
2015-04-10Get rid of false GCC 4.7 -Werror=type-limits in template codeStephan Bergmann
Change-Id: I4b13d3b7d74690401234dfa30c8c1b6647820b6a Reviewed-on: https://gerrit.libreoffice.org/15216 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2015-04-09loplugin:staticmethodsNoel Grandin
Change-Id: Ie348778ea666c24e95e048386547f301083a0017
2015-04-07convert SvtModuleOptions::EFactory to enum classNoel Grandin
and fix issues in iterating through o3tl::enumarray Change-Id: Ia59ef9be44d8c92c2e406fa71aa92269578e26e3
2015-04-02Change INetProtocol to scoped enumerationStephan Bergmann
...and fix o3tl::enumarray::operator [] const overload Change-Id: I749b1b9d68686b03a97074253478d9d2d9d32b0b
2015-04-02Model o3tl::enumarray after std::array to allow aggregate initializationStephan Bergmann
...though that requires switching of C++ -Wmissing-braces for Clang and for old GCC (new GCC already dropped it from C++ -Wall, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25137#c17>). Change-Id: I92acc4c529d634c4190e0ee4b65d1fbe5b1b521f
2015-04-01CosmeticsTor Lillqvist
Change-Id: I65ee75db015a402c8d93f10f03512669d6fa8e79
2015-04-01WaE: c-style castTor Lillqvist
Change-Id: Ia3d8c23e8c3b3a2c7bbbcfc9922272b62ca2fc49
2015-04-01convert BOX_LINE and BOXINFO_LINE to enum classNoel Grandin
since their usage is intertwined. Also introduce new o3tl utilities enumrange and enumarray to make working with scoped enums a little simpler. Change-Id: I2e1cc65dd7c638e59f17d96dfae504747cad6533
2015-03-19We require MSVC2013 (_MSC_VER == 1800) nowTor Lillqvist
Change-Id: Ice8504041f22e00f2e5010813d9dff1d2987c8d6
2015-03-11convert CHILD_ constants to enum classNoel Grandin
Change-Id: I1aca134fcc0384df4797cacafa9fbc1ed88d6617
2015-03-05Simplify o3tl::LazyUpdateStephan Bergmann
Change-Id: I7569a20877411a5ceb4a7475d82cb634eb6cb114
2015-02-23remove unnecessary parenthesis in return statementsNoel Grandin
found with $ git grep -lP 'return\s*\(\s*\w+\s*\)\s*;' Change-Id: Ic51606877a9edcadeb647c5bf17bc928b69ab60e
2015-02-16boost::foo_ptr->std::foo_ptrCaolán McNamara
Change-Id: I9219619b538b6530a89f5932ac51eb3b62eb396a
2015-01-24Typo: syncro->synchroJulien Nabet
Change-Id: I0a377f3686e0f8d8f576aacbee49a392b039d3a5
2015-01-16fdo#75757: remove inheritance to std::vectorAshod Nakashian
sorted_vector no longer inherits from std::vector and simplified some of the code. Change-Id: Ie9ab93dae6865f21f62abc384ed8c166b74d15ec Reviewed-on: https://gerrit.libreoffice.org/13881 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>