Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added missing const& in extend_boundary parameters #490

Merged
merged 1 commit into from
Apr 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions include/boost/gil/extension/numeric/algorithm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ namespace detail

template <typename SrcView, typename RltView>
void extend_row_impl(
SrcView src_view,
SrcView const& src_view,
RltView result_view,
std::size_t extend_count,
boundary_option option)
Expand All @@ -281,8 +281,8 @@ void extend_row_impl(
if(i >= extend_count_ && i < extend_count_ + src_view.height())
{
assign_pixels(
src_view.row_begin(i - extend_count_),
src_view.row_end(i - extend_count_),
src_view.row_begin(i - extend_count_),
src_view.row_end(i - extend_count_),
result_view.row_begin(i)
);
}
Expand All @@ -293,12 +293,12 @@ void extend_row_impl(
else
{
assign_pixels(
src_view.row_begin(src_view.height() - 1),
src_view.row_end(src_view.height() - 1),
src_view.row_begin(src_view.height() - 1),
src_view.row_end(src_view.height() - 1),
result_view.row_begin(i)
);
}

}
}
else if (option == boundary_option::extend_zero)
Expand All @@ -316,7 +316,7 @@ void extend_row_impl(
result_view.row_begin(i)
);
}
else
else
{
std::fill_n(result_view.row_begin(i), result_view.width(), acc_zero);
}
Expand Down Expand Up @@ -357,7 +357,7 @@ void extend_row_impl(
/// \tparam option - TODO
template <typename SrcView>
auto extend_row(
SrcView src_view,
SrcView const& src_view,
std::size_t extend_count,
boundary_option option
) -> typename gil::image<typename SrcView::value_type>
Expand All @@ -372,14 +372,14 @@ auto extend_row(


/// \brief adds new column at left and right.
/// Image padding introduces new pixels around the edges of an image.
/// Image padding introduces new pixels around the edges of an image.
/// The border provides space for annotations or acts as a boundary when using advanced filtering techniques.
/// \tparam SrcView Models ImageViewConcept
/// \tparam extend_count number of columns to be added each side
/// \tparam option - TODO
template <typename SrcView>
auto extend_col(
SrcView src_view,
SrcView const& src_view,
std::size_t extend_count,
boundary_option option
) -> typename gil::image<typename SrcView::value_type>
Expand All @@ -395,14 +395,14 @@ auto extend_col(
}

/// \brief adds new row and column at all sides.
/// Image padding introduces new pixels around the edges of an image.
/// Image padding introduces new pixels around the edges of an image.
/// The border provides space for annotations or acts as a boundary when using advanced filtering techniques.
/// \tparam SrcView Models ImageViewConcept
/// \tparam extend_count number of rows/column to be added each side
/// \tparam option - TODO
template <typename SrcView>
auto extend_boundary(
SrcView src_view,
SrcView const& src_view,
std::size_t extend_count,
boundary_option option
) -> typename gil::image<typename SrcView::value_type>
Expand Down