use references instead of pointer
This commit is contained in:
parent
7c2f886239
commit
7d1a43cb5e
1 changed files with 2 additions and 2 deletions
|
@ -16,7 +16,7 @@ void ofxMsdfgen::toOfImage(const msdfgen::Bitmap <float, 3> bitmap,
|
|||
int h = bitmap.height();
|
||||
for(int y = 0; y < h; y++){
|
||||
for(int x = 0; x < w; x++){
|
||||
const float * rgb = bitmap(x, y);
|
||||
const auto & rgb = bitmap(x, y);
|
||||
int index = 3 * (x + y * w);
|
||||
pixels.getData()[index] = (unsigned char)std::clamp(rgb[0] * 256.0,
|
||||
0.0, 255.0);
|
||||
|
@ -47,7 +47,7 @@ ofImage ofxMsdfgen::toOfImage(const msdfgen::Bitmap <float, 3> bitmap){
|
|||
int h = bitmap.height();
|
||||
for(int y = 0; y < h; y++){
|
||||
for(int x = 0; x < w; x++){
|
||||
const float * rgb = bitmap(x, y);
|
||||
const auto & rgb = bitmap(x, y);
|
||||
int index = 3 * (x + y * w);
|
||||
pixels.getData()[index] = (unsigned char)std::clamp(rgb[0] * 256.0,
|
||||
0.0, 255.0);
|
||||
|
|
Loading…
Reference in a new issue