Skip to content

Commit

Permalink
fix pnm CI issue (see ToruNiina/pnm#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed May 21, 2024
1 parent e36fb1d commit 3f1fbd1
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/hello_imgui/internal/pnm.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
#error "pnm++ is a library for C++."
#endif

//#if __cplusplus < 201103L
//#error "pnm++ requires C++11 or later."
//#endif
#if __cplusplus < 201103L
#error "pnm++ requires C++11 or later."
#endif

#include <cctype>
#include <type_traits>
Expand Down Expand Up @@ -421,22 +421,22 @@ namespace pnm
bool operator<(const line_proxy& rhs) const noexcept
{
return this->nx_ == rhs.nx_ && this->container_ == rhs.container_ &&
this->iy_ < rhs.ny_;
this->iy_ < rhs.iy_;
}
bool operator>(const line_proxy& rhs) const noexcept
{
return this->nx_ == rhs.nx_ && this->container_ == rhs.container_ &&
this->iy_ > rhs.ny_;
this->iy_ > rhs.iy_;
}
bool operator<=(const line_proxy& rhs) const noexcept
{
return this->nx_ == rhs.nx_ && this->container_ == rhs.container_ &&
this->iy_ <= rhs.ny_;
this->iy_ <= rhs.iy_;
}
bool operator>=(const line_proxy& rhs) const noexcept
{
return this->nx_ == rhs.nx_ && this->container_ == rhs.container_ &&
this->iy_ >= rhs.ny_;
this->iy_ >= rhs.iy_;
}

private:
Expand Down Expand Up @@ -510,22 +510,22 @@ namespace pnm
bool operator<(const const_line_proxy& rhs) const noexcept
{
return this->nx_ == rhs.nx_ && this->container_ == rhs.container_ &&
this->iy_ < rhs.ny_;
this->iy_ < rhs.iy_;
}
bool operator>(const const_line_proxy& rhs) const noexcept
{
return this->nx_ == rhs.nx_ && this->container_ == rhs.container_ &&
this->iy_ > rhs.ny_;
this->iy_ > rhs.iy_;
}
bool operator<=(const const_line_proxy& rhs) const noexcept
{
return this->nx_ == rhs.nx_ && this->container_ == rhs.container_ &&
this->iy_ <= rhs.ny_;
this->iy_ <= rhs.iy_;
}
bool operator>=(const const_line_proxy& rhs) const noexcept
{
return this->nx_ == rhs.nx_ && this->container_ == rhs.container_ &&
this->iy_ >= rhs.ny_;
this->iy_ >= rhs.iy_;
}

private:
Expand Down Expand Up @@ -1043,7 +1043,7 @@ namespace pnm
{
if (max == 255){return std::unique_ptr<identity>(new identity());}
else if(max > 255){return std::unique_ptr<reduce> (new reduce(max));}
else {return std::unique_ptr<enlarge> (new enlarge(static_cast<std::uint8_t>(max)));}
else {return std::unique_ptr<enlarge> (new enlarge(max));}
}

namespace literals
Expand All @@ -1067,7 +1067,6 @@ namespace pnm
template<typename Alloc = std::allocator<bit_pixel>>
image<bit_pixel, Alloc> read_pbm_ascii(const std::string& fname)
{
// using namespace detail::literals;
using namespace detail::literals;

std::ifstream ifs(fname);
Expand Down

0 comments on commit 3f1fbd1

Please sign in to comment.