Skip to content

Commit

Permalink
Move to c++11 for nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
markummitchell-tu committed Apr 20, 2019
1 parent ccf0fc7 commit 019109e
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions engauge.pro
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
# More comments are in the INSTALL file, and below

QT += core gui printsupport widgets xml
CONFIG += c++11 # For nullptr

!mac {
QT += help
Expand Down
4 changes: 2 additions & 2 deletions src/Jpeg2000/Jpeg2000.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ int Jpeg2000::getFileFormat(const char *filename) const
TIF_DFMT, RAW_DFMT, RAWL_DFMT, TGA_DFMT, PNG_DFMT,
J2K_CFMT, JP2_CFMT, JPT_CFMT, J2K_CFMT, J2K_CFMT};
const char * ext = strrchr(filename, '.');
if (ext == NULL) {
if (ext == nullptr) {
return -1;
}
ext++;
Expand Down Expand Up @@ -121,7 +121,7 @@ int Jpeg2000::inputFormat(const char *filename) const
reader = fopen(filename,
"rb");

if (reader == NULL) {
if (reader == nullptr) {
return -2;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Jpeg2000/Jpeg2000Color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ void color_apply_icc_profile(opj_image_t *image)
in_prof =
cmsOpenProfileFromMem(image->icc_profile_buf, image->icc_profile_len);

if(in_prof == NULL) return;
if(in_prof == nullptr) return;

in_space = cmsGetPCS(in_prof);
out_space = cmsGetColorSpace(in_prof);
Expand Down Expand Up @@ -368,7 +368,7 @@ void color_apply_icc_profile(opj_image_t *image)
cmsCloseProfile(out_prof);
#endif

if(transform == NULL)
if(transform == nullptr)
{
image->color_space = oldspace;
#ifdef OPJ_HAVE_LIBLCMS1
Expand Down
2 changes: 1 addition & 1 deletion src/Window/WindowModelBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ int WindowModelBase::fold2dIndexes (int row,
QMimeData *WindowModelBase::mimeData(const QModelIndexList &indexes) const
{
if (indexes.isEmpty ()) {
return Q_NULLPTR;
return nullptr;
}

QMimeData *data = new QMimeData ();
Expand Down
3 changes: 2 additions & 1 deletion src/engauge_test_template.pro
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ TEMPLATE = app
# qmake "CONFIG+=debug pdf"
# 3) Gratuitous warning about import_qpa_plugin in Fedora is due to 'CONFIG=qt' but that option takes care of
# include/library files in an automated and platform-independent manner, so it will not be removed
CONFIG += qt warn_on thread testcase
# 4) c++11 is required for nullptr
CONFIG += qt warn_on thread testcase c++11

OBJECTS_DIR = .objs_test
MOC_DIR = .moc_test
Expand Down
2 changes: 1 addition & 1 deletion test/version11_1.dig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<General CursorSize="3" ExtraPrecision="1"/>
<Coords Type="0" TypeString="Cartesian" Coords="0" ScaleXTheta="0" ScaleXThetaString="Linear" ScaleYRadius="0" ScaleYRadiusString="Linear" UnitsX="0" UnitsXString="Number" UnitsY="0" UnitsYString="Number" UnitsTheta="0" UnitsThetaString="Degrees (DDD.DDDDD)" UnitsRadius="0" UnitsRadiusString="Number" UnitsDate="3" UnitsDateString="YYYY/MM/DD" UnitsTime="2" UnitsTimeString="HH:MM:SS"/>
<DigitizeCurve CursorInnerRadius="5" CursorLineWidth="2" CursorSize="1" CursorStandardCross="True"/>
<Export PointsSelectionFunctions="1" PointsSelectionFunctionsString="InterpolateFirstCurve" PointsIntervalFunctions="10" PointsIntervalUnitsFunctions="1" PointsSelectionRelations="0" PointsSelectionRelationsString="Interpolate" PointsIntervalUnitsRelations="1" PointsIntervalRelations="10" LayoutFunctions="0" LayoutFunctionsString="AllPerLine" Delimiter="0" OverrideCsvTsv="False" DelimiterString="Commas" EndpointsEvenlySpaced="2" EndpointsEvenlySpacedString="ExtrapolatePast" EndpointsFirstCurve="0" EndpointsFirstCurveString="Omit" EndpointsGridLines="2" EndpointsGridLinesString="ExtrapolatePast" Header="1" HeaderString="Simple" XLabel="x">
<Export PointsSelectionFunctions="1" PointsSelectionFunctionsString="InterpolateFirstCurve" PointsIntervalFunctions="10" PointsIntervalUnitsFunctions="1" PointsSelectionRelations="0" PointsSelectionRelationsString="Interpolate" PointsIntervalUnitsRelations="1" PointsIntervalRelations="10" LayoutFunctions="0" LayoutFunctionsString="AllPerLine" Delimiter="0" OverrideCsvTsv="False" DelimiterString="Commas" ExtrapolateOutsideEndpoints="True" Header="1" HeaderString="Simple" XLabel="x">
<CurveNamesNotExported/>
</Export>
<AxesChecker Mode="1" Seconds="3" LineColor="6"/>
Expand Down

0 comments on commit 019109e

Please sign in to comment.