Skip to content

Commit e0e722f

Browse files
committed
vtfpp: ImagePixelV2: more conster more gooder
1 parent e816e6b commit e0e722f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/vtfpp/ImageConversion.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ namespace ImagePixelV2 {
387387
private: \
388388
T _##C; \
389389
public: \
390-
constexpr T C() { return this->_##C; } \
390+
constexpr T C() const { return this->_##C; } \
391391
constexpr void set_##C(T i##C) { this->_##C = i##C; }
392392

393393
#define VTFPP_SET_CHANNEL(C) \
@@ -424,7 +424,7 @@ namespace ImagePixelV2 {
424424
private: \
425425
static constexpr REPRTYPE SOURCEPP_CONCAT(max_, C) = (1 << BW) - 1; \
426426
public: \
427-
constexpr T C() { \
427+
constexpr T C() const { \
428428
return static_cast<T>((this->_repr.operator REPRTYPE() >> SOURCEPP_CONCAT(offs_, C)) & SOURCEPP_CONCAT(max_, C)); \
429429
} \
430430
constexpr void SOURCEPP_CONCAT(set_, C) (T SOURCEPP_CONCAT(i, C)) { \

0 commit comments

Comments
 (0)