mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2025-02-02 15:30:59 +00:00
Constify a few things
This commit is contained in:
parent
40743d612b
commit
b3d7cd7877
|
@ -57,7 +57,7 @@
|
||||||
|
|
||||||
namespace PVRTCC {
|
namespace PVRTCC {
|
||||||
|
|
||||||
Block::Block(uint8 *data)
|
Block::Block(const uint8 *data)
|
||||||
: m_ColorACached(false)
|
: m_ColorACached(false)
|
||||||
, m_ColorBCached(false) {
|
, m_ColorBCached(false) {
|
||||||
assert(data);
|
assert(data);
|
||||||
|
|
|
@ -61,7 +61,7 @@ namespace PVRTCC {
|
||||||
|
|
||||||
class Block {
|
class Block {
|
||||||
public:
|
public:
|
||||||
explicit Block(uint8 *data);
|
explicit Block(const uint8 *data);
|
||||||
|
|
||||||
Pixel GetColorA();
|
Pixel GetColorA();
|
||||||
Pixel GetColorB();
|
Pixel GetColorB();
|
||||||
|
|
|
@ -130,7 +130,7 @@ namespace PVRTCC {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Pixel::ChangeBitDepth(uint8 (&depth)[4]) {
|
void Pixel::ChangeBitDepth(const uint8 (&depth)[4]) {
|
||||||
for(uint32 i = 0; i < 4; i++) {
|
for(uint32 i = 0; i < 4; i++) {
|
||||||
m_Component[i] = ChangeBitDepth(m_Component[i], m_BitDepth[i], depth[i]);
|
m_Component[i] = ChangeBitDepth(m_Component[i], m_BitDepth[i], depth[i]);
|
||||||
m_BitDepth[i] = depth[i];
|
m_BitDepth[i] = depth[i];
|
||||||
|
|
|
@ -80,7 +80,7 @@ class Pixel {
|
||||||
// significant bits when going from larger to smaller bit depth
|
// significant bits when going from larger to smaller bit depth
|
||||||
// or by repeating the most significant bits when going from
|
// or by repeating the most significant bits when going from
|
||||||
// smaller to larger bit depths.
|
// smaller to larger bit depths.
|
||||||
void ChangeBitDepth(uint8 (&newDepth)[4]);
|
void ChangeBitDepth(const uint8 (&newDepth)[4]);
|
||||||
|
|
||||||
// Changes the bit depth of a single component. See the comment
|
// Changes the bit depth of a single component. See the comment
|
||||||
// above for how we do this.
|
// above for how we do this.
|
||||||
|
|
Loading…
Reference in a new issue