Browse Source

Add explanation to otherwise unnecessary parens.

v1.x
Jesper Ek 9 years ago
parent
commit
6c0931fb54
  1. 2
      src/CanvasRenderingContext2d.cc

2
src/CanvasRenderingContext2d.cc

@ -592,6 +592,8 @@ NAN_METHOD(Context2d::PutImageData) {
switch (info.Length()) {
// imageData, dx, dy
case 3:
// Need to wrap std::min calls using parens to prevent macro expansion on
// windows. See http://stackoverflow.com/questions/5004858/stdmin-gives-error
cols = (std::min)(imageData->width(), context->canvas()->width - dx);
rows = (std::min)(imageData->height(), context->canvas()->height - dy);
break;

Loading…
Cancel
Save