From 3f1fbd13c2b1f2d3121346554540944d01b1ff68 Mon Sep 17 00:00:00 2001 From: Pascal Thomet Date: Tue, 21 May 2024 11:00:15 +0200 Subject: [PATCH] fix pnm CI issue (see https://github.com/ToruNiina/pnm/pull/8) --- src/hello_imgui/internal/pnm.h | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/hello_imgui/internal/pnm.h b/src/hello_imgui/internal/pnm.h index 8bb882aa..ab91a5be 100644 --- a/src/hello_imgui/internal/pnm.h +++ b/src/hello_imgui/internal/pnm.h @@ -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 #include @@ -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: @@ -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: @@ -1043,7 +1043,7 @@ namespace pnm { if (max == 255){return std::unique_ptr(new identity());} else if(max > 255){return std::unique_ptr (new reduce(max));} - else {return std::unique_ptr (new enlarge(static_cast(max)));} + else {return std::unique_ptr (new enlarge(max));} } namespace literals @@ -1067,7 +1067,6 @@ namespace pnm template> image read_pbm_ascii(const std::string& fname) { - // using namespace detail::literals; using namespace detail::literals; std::ifstream ifs(fname);