Skip to content

Commit

Permalink
std::array in GlobalShaderParamState::buf
Browse files Browse the repository at this point in the history
  • Loading branch information
no-lex committed Sep 1, 2023
1 parent a0f0310 commit 43091e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/engine/render/shaderparam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ GlobalShaderParamState &GlobalShaderParam::getglobalparam(const std::string &nam
else
{
GlobalShaderParamState &param = globalparams[name];
std::memset(param.buf, -1, sizeof(param.buf));
param.buf.fill(-1);
param.version = -1;
return param;
}
Expand Down
2 changes: 1 addition & 1 deletion src/engine/render/shaderparam.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct GlobalShaderParamState
float fval[32];
int ival[32];
uint uval[32];
uchar buf[32*sizeof(float)];
std::array<uchar, 32*sizeof(float)> buf;
};
int version;

Expand Down

0 comments on commit 43091e8

Please sign in to comment.