2
0
mirror of https://github.com/boostorg/gil.git synced 2026-02-22 15:32:10 +00:00
Commit Graph

539 Commits

Author SHA1 Message Date
Mateusz Loskot
0e11759d4e Apply clang-tidy modernize-use-using to extension/dynamic_image (#193)
Run clang-tidy 7.0 with `-checks='-*,modernize-use-using' -fix`
against single TU with `#include <boost/gil/concepts/*.hpp>`.

Manually refactor numerous typedef-s
- where missed by modernize-use-using check, not uncommon
- in code snippets in comments

Outcome is that searching for lower-case whole word typedef
in all the extension/dynamic_image/*.hpp should return 5 matches,
in definitions of macros (TODO).
2018-12-16 01:25:12 +01:00
Mateusz Łoskot
77b9da56af [cmake] Keep main function name after switch to executable [ci skip] 2018-12-15 22:48:41 +01:00
Mateusz Łoskot
321bee2b79 [cmake] Fix missing source in add_executable [ci skip] 2018-12-15 21:56:52 +01:00
Mateusz Łoskot
293164e370 [cmake] Build header tests as executable, not OBJECT [ci skip]
Avoid file TOUCH command which requires CMake 3.12+
2018-12-15 21:42:42 +01:00
Mateusz Łoskot
8cb28a56cb [cmake] Update sample CMakeSettings.json with new options [ci skip] 2018-12-15 21:04:30 +01:00
Mateusz Łoskot
77c2ca64ef Add LICENSE.txt file [ci skip]
Follows Boost requirements update, https://github.com/boostorg/website/pull/374,
which allows and encourages individual libraries to
include the license file in their repositories.
2018-12-15 19:59:40 +01:00
Mateusz Loskot
46939c7b29 Apply clang-tidy modernize-use-using to core headers (#192)
Run clang-tidy 7.0 with `-checks='-*,modernize-use-using' -fix`
against single TU with `#include <boost/gil/concepts/*.hpp>`.

Manually refactor numerous typedef-s
- where missed by modernize-use-using check, not uncommon
- in code snippets in comments

Outcome is that searching for lower-case whole word typedef
in all the top-level core headers should return no matches.
2018-12-15 19:10:30 +01:00
Mateusz Łoskot
4616dc1bdc [numeric] Remove unused type alias from detail::correlate_rows_imp
Fix warning: typedef kernel_type locally defined but not used
[-Wunused-local-typedefs]
2018-12-15 01:03:43 +01:00
Samuel Debionne
6b0b66c0f2 Remove deprecated unary/binary_function (#191)
std::unary_function and std::binary_function are deprecated in C++11
and removed in C++17.
2018-12-14 22:58:55 +01:00
Mateusz Loskot
230158bd66 Fix const on return type not applied to pointee type of typedef (#190)
Replace png_structp and png_infop aliases with regular pointers to
to prevent type qualifiers ignored on function return type.
2018-12-14 08:12:45 +01:00
Mateusz Łoskot
96ae7e28f4 [cmake] Improve headers globbing [ci skip]
Core heades must not be globbed recursively.
2018-12-13 23:11:26 +01:00
Mateusz Łoskot
f300271fa3 [cmake] Add GIL_ENABLE_EXT_* options [ci skip] 2018-12-13 00:57:30 +01:00
Mateusz Łoskot
d2bb35ba85 Redirect clang-tidy output to a file [ci skip] 2018-12-13 00:04:27 +01:00
Mateusz Łoskot
5f94cd18de Update README with added sections and ToC [ci skip]
Basic structure and some paragraphs stolen from
https://github.com/boostorg/beast/ - a great README example.

Fixes #166
2018-12-12 22:11:07 +01:00
Mateusz Łoskot
d9dfc3800c [doc] Update running clang-tidy how-to [ci skip] 2018-12-12 21:20:49 +01:00
Mateusz Łoskot
b5ad3186c8 [cmake] Explain removal of default /W3 flag [ci skip] 2018-12-12 20:47:02 +01:00
Mateusz Loskot
2250b7159c Fix conflicting definitions from io/dynamic_io_new.hpp and toolbox/dynamic_images.hpp (#185)
The problem appears to be due to the same definitions copied from one
part of the library to the other.
The definitions have been shuffled to fix the compilation,
but purely based on searching the code for what is used where,
thus without confidence where those belong by author's intention.

Fixes #183
2018-12-12 17:58:57 +01:00
Mateusz Łoskot
aff86c252c [cmake] Add option GIL_USE_CLANG_TIDY (default OFF) [ci skip]
If ON, sets CMAKE_CXX_CLANG_TIDY property on all targets, so CMake will
run build via clang-tidy to perform linting.
2018-12-12 14:04:05 +01:00
Mateusz Łoskot
e99db3d0c4 [cmake] Tidy up [ci skip] 2018-12-12 14:00:13 +01:00
Mateusz Łoskot
36af17b390 [cmake] Add extensions ot all-in-one headers test
Updates #184
2018-12-11 23:22:19 +01:00
Mateusz Loskot
021e4b9d4c [cmake] Add test with all headers included in one TU (#184) [ci skip]
Rename target test_compile_headers to test_headers_self_contained.
Add target test_headers_all_in_one
- Currently tests headers of core, concepts and io.
2018-12-11 23:17:27 +01:00
Mateusz Loskot
78110fc89c Apply clang-tidy modernize-use-override (#182)
Used clang-tidy 7.0 with the command:

run-clang-tidy.py \
    -header-filter='boost\/gil\/.*'
    -checks='-*,modernize-use-override' -fix
2018-12-10 23:10:22 +01:00
Mateusz Łoskot
9533d5c101 Add -j8 to b2 invocation [ci skip]
Fix typos
2018-12-10 10:51:35 +01:00
Mateusz Loskot
e0288ece9e Apply clang-tidy modernize-use-nullptr (#180)
Used clang-tidy 7.0 with the command:

  run-clang-tidy.py \
      -header-filter='boost\/gil\/.*' \
      -checks='-*,modernize-use-nullptr' -fix

Update CONTRIBUTING.md on how to generate compile command
database and run clang-tidy.
2018-12-10 09:58:37 +01:00
Mateusz Loskot
682a7264da Include missing headers across boost/gil/extension/io (#179)
Missing headers revealed by compilation of self-contained header tests.
2018-12-09 23:40:38 +01:00
Mateusz Loskot
032a4786bb Remove unnecessary extern C around libraw.h include (#178)
Since libraw is C++ library, not C, it is always built as C++ library.
2018-12-09 21:38:59 +01:00
Mateusz Łoskot
41dac11d0a [cmake] Tidy up variable reuse [ci skip] 2018-12-09 16:12:59 +01:00
Mateusz Loskot
057a02ad0a Replace writer<Device,jpeg_tag> where writer_backend<Device,jpeg_tag> expected (#177)
The reference to `writer<Device,jpeg_tag>` is clearly incorrect:
- writer has no members `init_device`, `empty_buffer`, `closed_buffer`
- if use of writer was correct there, it would require
  `#include <boost/gil/extension/io/jpeg/detail/writer.hpp>`, but that
  would impose cyclic-dependency between writer.hpp and writer_backend.hpp.
2018-12-09 15:45:51 +01:00
Mateusz Łoskot
1c7e26ab93 [cmake] Rename target test_all_headers to test_compile_headers [ci skip] 2018-12-09 13:57:11 +01:00
Mateusz Łoskot
77e8a9bed4 Remove sample CMake output from CONTRIBUTING.md [ci skip]
There is little point in displaying it and it changes from time to time.
2018-12-09 12:52:31 +01:00
Mateusz Łoskot
92cddb3f71 [cmake] Bundle all Boost and IO libraries in gil_dependencies target
Simplify generating of IO tests targets, remove lots of duplicate cruft.
Tidy up CMake scripts.
2018-12-08 23:20:54 +01:00
Mateusz Łoskot
8c26143574 Add missing #include <boost/gil/extension/io/*/tags.hpp>
Fixes compilation error about undeclared *_tag.
2018-12-08 22:20:58 +01:00
Mateusz Łoskot
89f54ea203 [cmake] Add workaround for clean MSVC warning level setting [ci skip] 2018-12-08 22:08:40 +01:00
Mateusz Łoskot
b07501a8cc [cmake] Simplify and clarify -D options [ci skip]
Clean up CMakeLists.txt if-s.
2018-12-08 21:25:27 +01:00
Mateusz Łoskot
b6e8dbbf8f [cmake] Explain Boost regression not supposed to run headers tests [ci skip] 2018-12-08 15:59:04 +01:00
Mateusz Łoskot
ec58e31fa7 [cmake] Rename main to specific name in headers tests [ci skip]
Rename test_headers target to test_all_headers.
Rationalise use of CMake variables.
2018-12-08 12:16:32 +01:00
Mateusz Łoskot
a0b5767392 Add missing #include <boost/gil/extension/io/raw/tags.hpp>
Fixes compilation error about undeclared raw_tag.
2018-12-08 12:10:59 +01:00
Mateusz Łoskot
d017298440 [cmake] Make test/headers directory is redundant or incorrect [ci skip] 2018-12-08 12:00:52 +01:00
Mateusz Łoskot
03bba74b4e Modernize example/CMakeLists.txt [ci skip] 2018-12-08 11:54:56 +01:00
Mateusz Łoskot
9499b9db24 Update CMakeSettings.json to build examples [ci skip] 2018-12-08 11:31:25 +01:00
Mateusz Łoskot
531e671b49 Update example resize.cpp for new GIL IO
The I/O extensions have been entirely rewritten in Boost.GIL released
in Boost 1.68. The examples refactoring is still an ongoing effort.
2018-12-08 11:24:44 +01:00
Mateusz Łoskot
a0010e5233 Remove superfluous space from CMake generator expression [ci skip] 2018-12-08 11:23:14 +01:00
Mateusz Łoskot
2957351f57 Add self-contained header tests to CMake configuration [ci skip]
Similarly to the tests defined in Boost.Build configuration, those do
not run on CI builds or regression builds.
2018-12-08 02:40:45 +01:00
Mateusz Łoskot
63c450c2a9 Modernize CMake configuration
Replace global compile options and definitions with interface targets.
Remove globing for headers.
Set project version based on GIL version.
Remove GIL_BUILD_TESTS option as redundant - there is no point in
using CMake for development of header-only library if no tests
are to be built.
2018-12-08 01:05:47 +01:00
Mateusz Loskot
63e2a1a98a Fix compile-time bugs subchroma_image.hpp definions (#164)
Add missing typename in mpl::if_ condition result.
Restore BOOST_CXX14_CONSTEXPR in boost::algorithm::clamp function
- apparently, GCC 5.5.0 does not compile it with C++11 constexpr.
Still not adding subchroma_image.cpp to toolbox test target
input sources due to run-time failure.

Depends on #176
2018-12-07 23:55:13 +01:00
Mateusz Loskot
443eaa5fae Fix compilation of subchroma_image.hpp as self-contained headers (#176)
Rename `Scaling_Factors` to lower-case, as well as its template parameters.
Move `scaling_factors` to namespace `detail` and before it is use.
Fix access to `scaling_factors` members in derived classes.
Add missing `typename`.
Remove superfluous thus incorrect `typename`.
Remove `subchroma_image_view` implicit friends with self
- Fixes template parameter aliasing for Locator and Factors.

Subset of fixes from pending PR #164
2018-12-07 16:00:17 +01:00
Mateusz Łoskot
c1334b60fe Refer to EditorConfig that helps to avoid trailing whitespaces [ci skip]
Following #171 we should keep the code free from trailing whitespaces.
2018-12-07 10:10:54 +01:00
Mateusz Loskot
9e9ed7c239 Add missing #include-s to ensure self-contained headers (#175) 2018-12-07 09:50:52 +01:00
Mateusz Łoskot
1075967712 Move self-contained headers test to test/headers
Modify Boost.Jam script generating tests to support targets per the library
directories/modules.
2018-12-06 22:35:39 +01:00
Mateusz Łoskot
af4f0ef7f1 Update CONTRIBUTING.md for CMake 3.13 or later [ci skip]
Follows up recent CMake fixes in FindBoost.cmake:
- https://gitlab.kitware.com/cmake/cmake/merge_requests/2568
- https://gitlab.kitware.com/cmake/cmake/merge_requests/2579
2018-12-06 21:03:36 +01:00