Making 3 line function a one liner.
Simple challenge for frequent action while programming.
Start file
Pixel *operator[](Position p) {
return &pixels[p.getc()][p.getr()];
}
End file
Pixel *operator[](Position p) { return &pixels[p.getc()][p.getr()]; }
View Diff
1,3c1
< Pixel *operator[](Position p) {
< return &pixels[p.getc()][p.getr()];
< }
---
> Pixel *operator[](Position p) { return &pixels[p.getc()][p.getr()]; }
Solutions by @AAbraxas1:
Unlock 1 remaining solutions by signing in and submitting your own entry