2
0
mirror of https://github.com/boostorg/gil.git synced 2026-02-20 02:42:11 +00:00
Commit Graph

462 Commits

Author SHA1 Message Date
Mateusz Łoskot
4e5ffae00d Remove CMakeSettings.json for VS2017 as user-specific file [ci skip]
This is a local file with user-specific settings which does not fit into
the public git repository.
2018-10-19 19:07:05 +02:00
Mateusz Loskot
ce82941fa2 Rename point2<T> to point<T> (#155)
Add point2<T> alias template for backward compatibility with Boost <=1.68.
Replace multiple point_t aliases of point<ptrdiff_t> with single defined
in point.hpp. The point_t is common used to represent dimensions.
Replace many uses of point<ptrdiff_t> with point_t.

Apply reformatting around point2 changes to respect the line length limit.

Follows up discussion in #154
2018-10-19 09:32:23 +02:00
Mateusz Loskot
b4c3a69479 Extract point2<T> from utilities.hpp to point.hpp (#154)
The point belongs to core basic concepts in GIL, not an optional
utility. The tutorial starts with description of point.
Such core concepts are defined in dedicated headers which is quite
a useful convention that also makes the code structure clearer.

Remove from trivial point2 class superfluous empty destructor,
copy constructor, assignment operator.

Clean up point.hpp formatting (eg. respect line length limit).

Co-authored-by: Nikita Kniazev @Kojoley
2018-10-18 21:38:14 +02:00
Mateusz Łoskot
acd626c45e Fix warning: extra tokens at end of #endif directive 2018-10-15 22:15:30 +02:00
Mateusz Loskot
47ac718a13 Merge pull request #152 from mloskot/ml/trac-ticket-7189
Fix conflict with std::fill_n and boost::range::fill_n (Trac 7189)
2018-10-13 21:37:41 +02:00
Mateusz Łoskot
875136885a Fix conflict with std::fill_n and boost::range::fill_n (Trac 7189)
Add minimal test for the std::fill and boost::array or std::array as
pixel type.
2018-10-12 18:34:28 +02:00
Mateusz Loskot
1f1f8836ca Merge pull request #147 from mloskot/ml/add-headers-compile-test
Add test to verify headers are self-contained
2018-10-05 21:35:16 +02:00
Mateusz Łoskot
9dc67eae1d Add test to verify headers are self-contained
For each header, a translation unit is generated along with
corresponding compile target.
Currently, only boost/gil/*.hpp and boost/gil/io/* headres are included.

On CI services, compile self_contained_headers targets only if
TEST_HEADERS environment variable is set. This is to avoid build
timeouts due to CI services limits.
When running b2 locally, the tests are compiled by default.
2018-10-05 18:11:08 +02:00
Mateusz Loskot
aa323e1dc6 Merge pull request #146 from mloskot/ml/fix-some-gcc-warnings
Fix some gcc warnings
2018-10-04 20:29:44 +02:00
Mateusz Loskot
0e8336fd34 Merge pull request #148 from mloskot/ml/fix-self-contained-headers
Add #include directives with missing headers
2018-10-04 20:06:37 +02:00
Mateusz Łoskot
244be70c1d Add #include directives with missing headers
Make core and io headers self-contained.
Required by test to verify headers are self-contained in #147.
2018-10-03 23:27:57 +02:00
Mateusz Łoskot
e4e72b5ee4 Add explicit conversion of arithmetic result to expected result type
Fixes warnings due to implicit promotion of operands, then implicit
conversion.
2018-09-28 23:43:02 +02:00
Mateusz Łoskot
ed96c9cdf1 Use GCC pragma to disable -Wconversion and -Wfloat-equal
Fixes warnings where equality or assignment operators
applied to operands of different signedness or float-point.
2018-09-28 23:36:27 +02:00
Mateusz Łoskot
4bd625ff31 Replace unsigned with signed for int as compile-time index 2018-09-28 23:30:35 +02:00
Mateusz Loskot
7293313207 Merge pull request #145 from mloskot/ml/includes-relative-to-boost-root-and-sorted
Refactor library includes to #include <boost/gil/...>
2018-09-28 21:19:17 +02:00
Mateusz Łoskot
32fec9f05b Refactor library includes to #include <boost/gil/...>
Group include directives, sort within group:
* In headers of GIL core and extensions:
  1. boost/gil/extension/*
  2. boost/gil/*
  3. boost/*
  4. C++ standard library headers
* In programs:
  1. boost/gil/*
  2. boost/*
  3. C++ standard library headers
  4. "xxx.hpp" for local headers
Add basic guidelines to CONTRIBUTING.md.
Add/Remove #include <boost/config.hpp> or std headers un/necessary.
Rename gil_concept.hpp to concepts.hpp.
Remove gil_all.hpp - we already have all-in-one boost/gil.hpp.
Tidy up and unify copyright and license header.
Tidy up formatting and excessive whitespaces in some comments.
Remove Doxygen block with file description, author, date, etc.
Remove dead or commented pragmas and directives.
Trim trailing whitespaces.
2018-09-28 16:26:34 +02:00
Mateusz Loskot
fe0113e828 Merge pull request #144 from mloskot/ml/remove-gil-config-header
Remove gil_config.hpp as unnecessary
2018-09-27 20:12:56 +02:00
Mateusz Łoskot
c3bb2e1a94 Remove gil_config.hpp as unnecessary
Move BOOST_GIL_CONFIG_HAS_UNALIGNED_ACCESS define setting and
documentation comment to channel.hpp where solely used.

Trim trailing whitespaces.
2018-09-27 15:38:40 +02:00
Mateusz Łoskot
4f74f6e365 Catch up with recent clean up in Numeric [ci skip]
The test.cpp was removed in ecc19de7c9
2018-09-25 10:56:59 +02:00
Mateusz Loskot
7f0c223ddc Merge pull request #128 from mloskot/ml/trac-ticket-2979
Correct description of image_is_basic metafunction (Trac 2979)
2018-09-24 20:29:36 +02:00
Mateusz Loskot
8b7ed5e111 Merge pull request #143 from mloskot/ml/avoid-warnings-in-promote_integral
Add casts to avoid warnings due to implicit integral promotions
2018-09-24 14:57:44 +02:00
Mateusz Łoskot
609a2d3a49 Add casts to avoid warnings due to implicit integral promotions
The explicit casts help to avoid warnings when integer types
smaller than int are implicitly converted during arithmetic operations.
2018-09-24 11:11:01 +02:00
Mateusz Łoskot
afe0c2415b Fix warning: comparing floating point with == is unsafe
Use >= trick where value is guaranteed to never be greater than comparator
but to avoid warning: comparing floating point with == is unsafe.
2018-09-24 10:42:31 +02:00
Mateusz Loskot
7a5bd6986e Merge pull request #139 from mloskot/ml/trac-ticket-7092
Remove re-assignment of functor from for_each_pixel (Trac 7092)
2018-09-23 21:26:07 +02:00
Mateusz Loskot
dd862cefb9 Merge pull request #138 from mloskot/ml/fix-toolbox-get_num_bits-as-unsigned
Base get_num_bits metafunction for T on mpl::size_t instead of mpl::int_
2018-09-23 21:08:28 +02:00
Mateusz Loskot
11a84bf05c Merge pull request #134 from mloskot/ml/fix-warning-float-equal
Fix warning: comparing floating point with == is unsafe
2018-09-23 21:07:23 +02:00
Mateusz Loskot
b6a9c9a938 Merge pull request #141 from mloskot/ml/example-jamfile-update [ci skip]
Add first batch of examples to Jamfile
2018-09-22 10:38:25 +02:00
Mateusz Łoskot
aac69ac846 Add first batch of examples to Jamfile
Update examples to catch up with recent changes and ensure they both
compile without errors (using GCC 5).
2018-09-21 23:02:49 +02:00
Mateusz Loskot
95fbc4b2d3 Merge pull request #140 from mloskot/ml/jamfiles-cleanup
Simplify and clean up Jamfiles
2018-09-21 21:44:00 +02:00
Mateusz Łoskot
f613cc4088 Remove re-assignment of functor from for_each_pixel (Trac 7092)
The assignment was superfluous in general case and incorrect in specific
case when the algorithm was given a lambda expression.
The copy assignment operator is defined as deleted for lambda
expressions.

Add minimal test for for_each_pixel algorithm to verify it compiles with
lambda expression.
2018-09-21 18:50:40 +02:00
Mateusz Łoskot
ecc19de7c9 Simplify and clean up Jamfiles
Rename Jamfile.v2 to Jamfile - BBV1 is dead.
Remove numeric/test/test.cpp as redundant.
2018-09-21 18:02:37 +02:00
Mateusz Loskot
4093bd5111 Merge pull request #137 from mloskot/ml/fix-buffer-shadow
Rename JPEG-s reader_backend::buffer member array to buffer_
2018-09-20 12:14:48 +02:00
Mateusz Łoskot
79f01a4d35 Fix warning: comparing floating point with == is unsafe
Trick compiler by using >= instead of ==,
where LHS color is guaranteed to never be greater than RHS color value.
2018-09-19 18:58:29 +02:00
Mateusz Łoskot
5d189679fb Base get_num_bits metafunction for T on mpl::size_t instead of mpl::int_
Previously used mpl::int_ assumes signed integer, while sizeof(T) is
unsigned and compiler issues warning.
2018-09-19 18:58:06 +02:00
Mateusz Łoskot
18d5ecb7a8 Rename JPEG-s reader_backend::buffer member array to buffer_
The previous name is too generic and prone to variable shadowing,
causing compilation warnings (eg. vector named buffer in JPEG-s
reader::read_rows method).
2018-09-19 18:53:52 +02:00
Mateusz Loskot
972343a014 Merge pull request #135 from mloskot/ml/fix-example-dynamic-image-post-boost-1.68
Update example/dynamic_image.cpp after IO reimplentation
2018-09-19 15:17:45 +02:00
Mateusz Łoskot
513cd9d512 Update example/dynamic_image.cpp after IO reimplentation
Reminder: Boost.GIL 2.2 released in Boost 1.67
has completely reimplemented I/O extensions.
There still may be examples that no longer compiler.
2018-09-19 11:42:28 +02:00
Mateusz Łoskot
275b12ccff [travis] Force installation of Sphinx 1.7.9 due to bug in 1.8.0
Fixes #136
2018-09-19 11:38:52 +02:00
Mateusz Łoskot
18963c857c Fix CMake status message [ci skip] 2018-09-18 12:01:55 +02:00
Mateusz Łoskot
0dbca043a8 Unify git submodule update command [ci skip] 2018-09-16 22:06:34 +02:00
Mateusz Loskot
ea7e85e4b8 Merge pull request #133 from mloskot/ml/trac-ticket-2222
Update image_view to model Collection concept (Trac 2222)
2018-08-30 16:01:57 +02:00
Mateusz Łoskot
b1eaa7ea90 Update image_view to model Collection concept (Trac 2222)
* Applies patch from John Femiani submitted via Trac
  https://svn.boost.org/trac10/ticket/2222 description:
  It would be convenient if GIL views modeled ReversibleCollection concept.
  In fact they almost do already. Without modeling this concept, it is
  hard to use an image view with boost::range algorithms.
* Add related image_view concepts for Collection, ForwardCollection,
  ReversibleCollection.
* Add tests for the new concepts.
* Add run-time tests for the new image_view methods.
2018-08-29 22:10:18 +02:00
Mateusz Łoskot
4c9ba74769 Replace lightweight_test_traits.hpp with lightweight_test.hpp 2018-08-29 18:04:06 +02:00
Mateusz Łoskot
85dbc8c21f Switch image_view tests from Boost.Test to Boost.Core.LightweightTest 2018-08-29 17:55:46 +02:00
Mateusz Łoskot
46e29e396c Expose C++11 requirement [ci skip] 2018-08-29 16:21:06 +02:00
Mateusz Loskot
ee4d239513 Merge pull request #132 from mloskot/ml/fix-warning-unused-variable
Fix warning about assigned but unused variable num_elements
2018-08-27 09:12:06 +02:00
Mateusz Loskot
d814313bb6 Merge pull request #129 from mloskot/ml/trac-ticket-8896
Add missing template keyword prior to dependent name axis_iterator (Trac 8896)
2018-08-27 09:10:47 +02:00
Mateusz Łoskot
871b7b6897 Fix warning about assigned but unused variable num_elements 2018-08-25 22:54:29 +02:00
Mateusz Łoskot
61d55226f9 [CircleCI] Switch build GCC 8.1 to 8.2 2018-08-25 22:46:08 +02:00
Mateusz Łoskot
29f84f402c Add GCC flags extended with extra warnings [ci skip]
Currently, the extended flags are disabled by default.
The list of extra warnings taken from Trac ticket
https://svn.boost.org/trac10/ticket/4014
2018-08-25 10:07:22 +02:00