Skip to content
This repository has been archived by the owner on Jan 2, 2023. It is now read-only.

Commit

Permalink
change the default value for crop settings
Browse files Browse the repository at this point in the history
  • Loading branch information
PaperBag42 committed Apr 11, 2019
1 parent fa429a4 commit 58b0963
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/lib/imagesettings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@ struct DLL_LOCAL ReflectImpl<ImageGlobal>: public ReflectClass {
}
};

const int CropSettings::DEFAULT = std::numeric_limits<int>::min();

CropSettings::CropSettings():
left(-1),
top(-1),
width(-1),
height(-1) {}
left(DEFAULT),
top(DEFAULT),
width(DEFAULT),
height(DEFAULT) {}

ImageGlobal::ImageGlobal():
logLevel(Info),
Expand Down
3 changes: 3 additions & 0 deletions src/lib/imagesettings.hh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <logging.hh>
#include <loadsettings.hh>
#include <websettings.hh>
#include <limits>

#include <dllbegin.inc>
namespace wkhtmltopdf {
Expand All @@ -41,6 +42,8 @@ struct DLL_PUBLIC CropSettings {
int width;
//! Cropping height/h dime
int height;

static const int DEFAULT;
};

/*! \brief Class holding all user settings.
Expand Down

0 comments on commit 58b0963

Please sign in to comment.