mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-25 22:57:22 +00:00
astc: Pass val in Replicate by copy
This commit is contained in:
parent
134f3ff9b4
commit
d71d7d917e
1 changed files with 1 additions and 1 deletions
|
@ -628,7 +628,7 @@ static void FillError(u32* outBuf, u32 blockWidth, u32 blockHeight) {
|
||||||
// Replicates low numBits such that [(toBit - 1):(toBit - 1 - fromBit)]
|
// Replicates low numBits such that [(toBit - 1):(toBit - 1 - fromBit)]
|
||||||
// is the same as [(numBits - 1):0] and repeats all the way down.
|
// is the same as [(numBits - 1):0] and repeats all the way down.
|
||||||
template <typename IntType>
|
template <typename IntType>
|
||||||
static IntType Replicate(const IntType& val, u32 numBits, u32 toBit) {
|
static IntType Replicate(IntType val, u32 numBits, u32 toBit) {
|
||||||
if (numBits == 0)
|
if (numBits == 0)
|
||||||
return 0;
|
return 0;
|
||||||
if (toBit == 0)
|
if (toBit == 0)
|
||||||
|
|
Loading…
Reference in a new issue