Improve min/max docs, thanks @LinusU

Add requirement for C++11 compiler

Init scaling factor to silence compiler warning
This commit is contained in:
Lovell Fuller
2015-02-27 13:49:16 +00:00
parent 88753a6333
commit 77bbbb9715
2 changed files with 15 additions and 5 deletions

View File

@@ -248,7 +248,7 @@ class ResizeWorker : public NanAsyncWorker {
int interpolatorWindowSize = InterpolatorWindowSize(baton->interpolator.c_str());
// Scaling calculations
double factor;
double factor = 1.0;
if (baton->width > 0 && baton->height > 0) {
// Fixed width and height
double xfactor = static_cast<double>(inputWidth) / static_cast<double>(baton->width);
@@ -287,7 +287,6 @@ class ResizeWorker : public NanAsyncWorker {
baton->width = floor(static_cast<double>(inputWidth) / factor);
} else {
// Identity transform
factor = 1;
baton->width = inputWidth;
baton->height = inputHeight;
}