Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
KStars
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
28
Issues
28
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Education
KStars
Commits
827f5c2d
Commit
827f5c2d
authored
May 30, 2017
by
Csaba Kertesz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace NULL with nullptr
parent
d0bd857d
Changes
152
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
152 changed files
with
1624 additions
and
1501 deletions
+1624
-1501
kstars/auxiliary/binfilehelper.cpp
kstars/auxiliary/binfilehelper.cpp
+5
-4
kstars/auxiliary/binfilehelper.h
kstars/auxiliary/binfilehelper.h
+3
-3
kstars/auxiliary/filedownloader.h
kstars/auxiliary/filedownloader.h
+2
-2
kstars/auxiliary/geolocation.h
kstars/auxiliary/geolocation.h
+2
-2
kstars/data/tools/binfile.h
kstars/data/tools/binfile.h
+14
-22
kstars/data/tools/nomadbinfile2mysql.cpp
kstars/data/tools/nomadbinfile2mysql.cpp
+3
-3
kstars/dialogs/detaildialog.cpp
kstars/dialogs/detaildialog.cpp
+15
-9
kstars/dialogs/locationdialog.cpp
kstars/dialogs/locationdialog.cpp
+6
-7
kstars/ekos/align/align.cpp
kstars/ekos/align/align.cpp
+31
-34
kstars/ekos/align/align.h
kstars/ekos/align/align.h
+5
-5
kstars/ekos/align/alignview.cpp
kstars/ekos/align/alignview.cpp
+2
-2
kstars/ekos/align/offlineastrometryparser.cpp
kstars/ekos/align/offlineastrometryparser.cpp
+1
-1
kstars/ekos/align/remoteastrometryparser.cpp
kstars/ekos/align/remoteastrometryparser.cpp
+7
-6
kstars/ekos/align/remoteastrometryparser.h
kstars/ekos/align/remoteastrometryparser.h
+1
-1
kstars/ekos/auxiliary/darklibrary.cpp
kstars/ekos/auxiliary/darklibrary.cpp
+8
-7
kstars/ekos/auxiliary/dome.cpp
kstars/ekos/auxiliary/dome.cpp
+8
-8
kstars/ekos/auxiliary/dustcap.cpp
kstars/ekos/auxiliary/dustcap.cpp
+9
-9
kstars/ekos/auxiliary/weather.cpp
kstars/ekos/auxiliary/weather.cpp
+3
-3
kstars/ekos/capture/capture.cpp
kstars/ekos/capture/capture.cpp
+65
-61
kstars/ekos/capture/dslrinfodialog.h
kstars/ekos/capture/dslrinfodialog.h
+1
-1
kstars/ekos/capture/sequencejob.cpp
kstars/ekos/capture/sequencejob.cpp
+8
-6
kstars/ekos/ekosmanager.cpp
kstars/ekos/ekosmanager.cpp
+74
-73
kstars/ekos/ekosmanager.h
kstars/ekos/ekosmanager.h
+2
-2
kstars/ekos/focus/focus.cpp
kstars/ekos/focus/focus.cpp
+53
-50
kstars/ekos/guide/guide.cpp
kstars/ekos/guide/guide.cpp
+30
-29
kstars/ekos/guide/internalguide/gmath.cpp
kstars/ekos/guide/internalguide/gmath.cpp
+9
-8
kstars/ekos/guide/internalguide/guider.cpp
kstars/ekos/guide/internalguide/guider.cpp
+16
-24
kstars/ekos/guide/internalguide/internalguider.cpp
kstars/ekos/guide/internalguide/internalguider.cpp
+3
-2
kstars/ekos/guide/internalguide/rcalibration.cpp
kstars/ekos/guide/internalguide/rcalibration.cpp
+1
-1
kstars/ekos/mount/mount.cpp
kstars/ekos/mount/mount.cpp
+14
-17
kstars/ekos/opsekos.h
kstars/ekos/opsekos.h
+1
-1
kstars/ekos/profileeditor.cpp
kstars/ekos/profileeditor.cpp
+2
-2
kstars/ekos/profilewizard.cpp
kstars/ekos/profilewizard.cpp
+2
-1
kstars/ekos/scheduler/mosaic.cpp
kstars/ekos/scheduler/mosaic.cpp
+11
-9
kstars/ekos/scheduler/scheduler.cpp
kstars/ekos/scheduler/scheduler.cpp
+55
-49
kstars/fitsviewer/fitsdata.cpp
kstars/fitsviewer/fitsdata.cpp
+43
-43
kstars/fitsviewer/fitsdata.h
kstars/fitsviewer/fitsdata.h
+4
-4
kstars/fitsviewer/fitshistogram.cpp
kstars/fitsviewer/fitshistogram.cpp
+18
-14
kstars/fitsviewer/fitslabel.cpp
kstars/fitsviewer/fitslabel.cpp
+3
-3
kstars/fitsviewer/fitslabel.h
kstars/fitsviewer/fitslabel.h
+1
-1
kstars/fitsviewer/fitstab.cpp
kstars/fitsviewer/fitstab.cpp
+6
-6
kstars/fitsviewer/fitsview.cpp
kstars/fitsviewer/fitsview.cpp
+18
-18
kstars/fitsviewer/fitsview.h
kstars/fitsviewer/fitsview.h
+2
-2
kstars/fitsviewer/fitsviewer.cpp
kstars/fitsviewer/fitsviewer.cpp
+12
-12
kstars/htmesh/HTMesh.cpp
kstars/htmesh/HTMesh.cpp
+1
-1
kstars/htmesh/MeshBuffer.cpp
kstars/htmesh/MeshBuffer.cpp
+1
-2
kstars/htmesh/SpatialEdge.cpp
kstars/htmesh/SpatialEdge.cpp
+14
-10
kstars/htmesh/SpatialException.cpp
kstars/htmesh/SpatialException.cpp
+2
-1
kstars/indi/clientmanager.cpp
kstars/indi/clientmanager.cpp
+6
-11
kstars/indi/clientmanagerlite.cpp
kstars/indi/clientmanagerlite.cpp
+13
-13
kstars/indi/devicemanager.cpp
kstars/indi/devicemanager.cpp
+20
-26
kstars/indi/driverinfo.cpp
kstars/indi/driverinfo.cpp
+6
-7
kstars/indi/drivermanager.cpp
kstars/indi/drivermanager.cpp
+40
-43
kstars/indi/guimanager.cpp
kstars/indi/guimanager.cpp
+6
-6
kstars/indi/indicap.cpp
kstars/indi/indicap.cpp
+22
-11
kstars/indi/indiccd.cpp
kstars/indi/indiccd.cpp
+160
-138
kstars/indi/indidbus.cpp
kstars/indi/indidbus.cpp
+1
-1
kstars/indi/indidevice.cpp
kstars/indi/indidevice.cpp
+24
-27
kstars/indi/indidome.cpp
kstars/indi/indidome.cpp
+18
-11
kstars/indi/indidriver.cpp
kstars/indi/indidriver.cpp
+33
-39
kstars/indi/indielement.cpp
kstars/indi/indielement.cpp
+27
-29
kstars/indi/indifocuser.cpp
kstars/indi/indifocuser.cpp
+24
-15
kstars/indi/indigroup.cpp
kstars/indi/indigroup.cpp
+1
-6
kstars/indi/indilistener.cpp
kstars/indi/indilistener.cpp
+8
-9
kstars/indi/indimenu.cpp
kstars/indi/indimenu.cpp
+12
-8
kstars/indi/indiproperty.cpp
kstars/indi/indiproperty.cpp
+35
-42
kstars/indi/indistd.cpp
kstars/indi/indistd.cpp
+59
-45
kstars/indi/indistd.h
kstars/indi/indistd.h
+3
-3
kstars/indi/inditelescope.cpp
kstars/indi/inditelescope.cpp
+86
-64
kstars/indi/inditelescope.h
kstars/indi/inditelescope.h
+6
-5
kstars/indi/inditelescopelite.cpp
kstars/indi/inditelescopelite.cpp
+64
-46
kstars/indi/indiweather.cpp
kstars/indi/indiweather.cpp
+5
-6
kstars/indi/indiwebmanager.cpp
kstars/indi/indiwebmanager.cpp
+8
-8
kstars/indi/indiwebmanager.h
kstars/indi/indiwebmanager.h
+1
-1
kstars/indi/servermanager.cpp
kstars/indi/servermanager.cpp
+11
-12
kstars/indi/telescopewizardprocess.cpp
kstars/indi/telescopewizardprocess.cpp
+5
-13
kstars/indi/videowg.h
kstars/indi/videowg.h
+9
-9
kstars/kspopupmenu.cpp
kstars/kspopupmenu.cpp
+4
-4
kstars/kstars.cpp
kstars/kstars.cpp
+2
-2
kstars/kstarsactions.cpp
kstars/kstarsactions.cpp
+14
-14
kstars/kstarsdbus.cpp
kstars/kstarsdbus.cpp
+5
-5
kstars/kstarsinit.cpp
kstars/kstarsinit.cpp
+2
-2
kstars/kstarslite.cpp
kstars/kstarslite.cpp
+5
-5
kstars/kstarslite/deviceorientation.h
kstars/kstarslite/deviceorientation.h
+1
-1
kstars/kstarslite/dialogs/detaildialoglite.cpp
kstars/kstarslite/dialogs/detaildialoglite.cpp
+6
-5
kstars/kstarslite/dialogs/locationdialoglite.cpp
kstars/kstarslite/dialogs/locationdialoglite.cpp
+1
-1
kstars/kstarslite/skyitems/deepstaritem.cpp
kstars/kstarslite/skyitems/deepstaritem.cpp
+1
-1
kstars/kstarslite/skyitems/skynodes/crosshairnode.cpp
kstars/kstarslite/skyitems/skynodes/crosshairnode.cpp
+11
-7
kstars/kstarslite/skyobjectlite.cpp
kstars/kstarslite/skyobjectlite.cpp
+1
-3
kstars/kstarslite/skypointlite.cpp
kstars/kstarslite/skypointlite.cpp
+1
-1
kstars/kstarsliteinit.cpp
kstars/kstarsliteinit.cpp
+2
-2
kstars/oal/execute.cpp
kstars/oal/execute.cpp
+15
-16
kstars/oal/log.cpp
kstars/oal/log.cpp
+44
-16
kstars/options/opsguides.cpp
kstars/options/opsguides.cpp
+2
-2
kstars/printing/printingwizard.cpp
kstars/printing/printingwizard.cpp
+1
-1
kstars/skycomponents/artificialhorizoncomponent.cpp
kstars/skycomponents/artificialhorizoncomponent.cpp
+7
-6
kstars/skycomponents/asteroidscomponent.cpp
kstars/skycomponents/asteroidscomponent.cpp
+2
-1
kstars/skycomponents/deepskycomponent.h
kstars/skycomponents/deepskycomponent.h
+3
-3
kstars/skycomponents/deepstarcomponent.cpp
kstars/skycomponents/deepstarcomponent.cpp
+4
-4
kstars/skycomponents/deepstarcomponent.h
kstars/skycomponents/deepstarcomponent.h
+1
-1
kstars/skycomponents/listcomponent.h
kstars/skycomponents/listcomponent.h
+2
-2
kstars/skycomponents/planetmoonscomponent.cpp
kstars/skycomponents/planetmoonscomponent.cpp
+2
-2
kstars/skycomponents/planetmoonscomponent.h
kstars/skycomponents/planetmoonscomponent.h
+1
-1
kstars/skycomponents/pointlistcomponent.h
kstars/skycomponents/pointlistcomponent.h
+1
-1
kstars/skycomponents/satellitescomponent.h
kstars/skycomponents/satellitescomponent.h
+1
-1
kstars/skycomponents/skycomponent.h
kstars/skycomponents/skycomponent.h
+4
-4
kstars/skycomponents/skycomposite.h
kstars/skycomponents/skycomposite.h
+2
-2
kstars/skycomponents/skymapcomposite.h
kstars/skycomponents/skymapcomposite.h
+1
-1
kstars/skycomponents/skymesh.cpp
kstars/skycomponents/skymesh.cpp
+7
-6
kstars/skycomponents/skymesh.h
kstars/skycomponents/skymesh.h
+1
-1
kstars/skycomponents/starblock.cpp
kstars/skycomponents/starblock.cpp
+2
-1
kstars/skycomponents/starblock.h
kstars/skycomponents/starblock.h
+1
-1
kstars/skycomponents/starblockfactory.cpp
kstars/skycomponents/starblockfactory.cpp
+33
-31
kstars/skycomponents/starblockfactory.h
kstars/skycomponents/starblockfactory.h
+2
-2
kstars/skycomponents/starblocklist.h
kstars/skycomponents/starblocklist.h
+2
-2
kstars/skycomponents/starcomponent.cpp
kstars/skycomponents/starcomponent.cpp
+3
-3
kstars/skycomponents/starcomponent.h
kstars/skycomponents/starcomponent.h
+3
-3
kstars/skycomponents/supernovaecomponent.cpp
kstars/skycomponents/supernovaecomponent.cpp
+1
-1
kstars/skycomponents/supernovaecomponent.h
kstars/skycomponents/supernovaecomponent.h
+1
-1
kstars/skycomponents/targetlistcomponent.h
kstars/skycomponents/targetlistcomponent.h
+3
-3
kstars/skymap.cpp
kstars/skymap.cpp
+6
-6
kstars/skymap.h
kstars/skymap.h
+2
-2
kstars/skymapdrawabstract.cpp
kstars/skymapdrawabstract.cpp
+9
-9
kstars/skymaplite.cpp
kstars/skymaplite.cpp
+8
-8
kstars/skymaplite.h
kstars/skymaplite.h
+2
-2
kstars/skyobjects/deepskyobject.cpp
kstars/skyobjects/deepskyobject.cpp
+2
-2
kstars/skyobjects/ksasteroid.h
kstars/skyobjects/ksasteroid.h
+1
-1
kstars/skyobjects/kscomet.h
kstars/skyobjects/kscomet.h
+1
-1
kstars/skyobjects/ksmoon.cpp
kstars/skyobjects/ksmoon.cpp
+3
-2
kstars/skyobjects/ksmoon.h
kstars/skyobjects/ksmoon.h
+1
-1
kstars/skyobjects/ksplanet.cpp
kstars/skyobjects/ksplanet.cpp
+1
-3
kstars/skyobjects/ksplanet.h
kstars/skyobjects/ksplanet.h
+1
-1
kstars/skyobjects/ksplanetbase.h
kstars/skyobjects/ksplanetbase.h
+5
-5
kstars/skyobjects/kspluto.h
kstars/skyobjects/kspluto.h
+1
-1
kstars/skyobjects/kssun.h
kstars/skyobjects/kssun.h
+1
-1
kstars/skyobjects/skypoint.cpp
kstars/skyobjects/skypoint.cpp
+2
-2
kstars/skyobjects/skypoint.h
kstars/skyobjects/skypoint.h
+2
-2
kstars/tools/avtplotwidget.cpp
kstars/tools/avtplotwidget.cpp
+1
-1
kstars/tools/conjunctions.cpp
kstars/tools/conjunctions.cpp
+1
-1
kstars/tools/flagmanager.cpp
kstars/tools/flagmanager.cpp
+1
-1
kstars/tools/horizonmanager.cpp
kstars/tools/horizonmanager.cpp
+7
-8
kstars/tools/ksconjunct.cpp
kstars/tools/ksconjunct.cpp
+6
-8
kstars/tools/observinglist.cpp
kstars/tools/observinglist.cpp
+8
-4
kstars/tools/observinglist.h
kstars/tools/observinglist.h
+4
-4
kstars/tools/obslistpopupmenu.cpp
kstars/tools/obslistpopupmenu.cpp
+1
-1
kstars/tools/planetviewer.cpp
kstars/tools/planetviewer.cpp
+1
-1
kstars/tools/scriptbuilder.cpp
kstars/tools/scriptbuilder.cpp
+17
-7
kstars/tools/scriptfunction.cpp
kstars/tools/scriptfunction.cpp
+1
-2
kstars/tools/starhopper.cpp
kstars/tools/starhopper.cpp
+2
-1
kstars/tools/whatsinteresting/wiequipsettings.cpp
kstars/tools/whatsinteresting/wiequipsettings.cpp
+2
-1
kstars/tools/whatsinteresting/wiview.cpp
kstars/tools/whatsinteresting/wiview.cpp
+4
-3
kstars/tools/wutdialog.cpp
kstars/tools/wutdialog.cpp
+2
-2
No files found.
kstars/auxiliary/binfilehelper.cpp
View file @
827f5c2d
...
...
@@ -26,7 +26,7 @@ class BinFileHelper;
BinFileHelper
::
BinFileHelper
()
{
fileHandle
=
NULL
;
fileHandle
=
nullptr
;
init
();
}
...
...
@@ -41,7 +41,8 @@ void BinFileHelper::init()
{
if
(
fileHandle
)
fclose
(
fileHandle
);
fileHandle
=
NULL
;
fileHandle
=
nullptr
;
indexUpdated
=
false
;
FDUpdated
=
false
;
RSUpdated
=
false
;
...
...
@@ -84,7 +85,7 @@ FILE * BinFileHelper::openFile(const QString &fileName)
if
(
!
fileHandle
)
{
errnum
=
ERR_FILEOPEN
;
return
NULL
;
return
nullptr
;
}
return
fileHandle
;
}
...
...
@@ -269,7 +270,7 @@ bool BinFileHelper::readHeader()
void
BinFileHelper
::
closeFile
()
{
fclose
(
fileHandle
);
fileHandle
=
NULL
;
fileHandle
=
nullptr
;
}
int
BinFileHelper
::
getErrorNumber
()
...
...
kstars/auxiliary/binfilehelper.h
View file @
827f5c2d
...
...
@@ -76,7 +76,7 @@ class BinFileHelper
*WARNING: This function may not be compatible in other locales, because it calls QString::toAscii
*@short Open a Binary data file and set the handle
*@param fileName Reference to QString containing the name of the file
*@return Handle to the file if successful,
NULL
if an error occurred, sets the error.
*@return Handle to the file if successful,
nullptr
if an error occurred, sets the error.
*/
FILE
*
openFile
(
const
QString
&
fileName
);
...
...
@@ -132,7 +132,7 @@ class BinFileHelper
/**
*@short Get the file handle corresponding to the currently open file
*@return The filehandle if a file is open,
NULL
if no file is open
*@return The filehandle if a file is open,
nullptr
if no file is open
*/
inline
FILE
*
getFileHandle
()
const
{
...
...
@@ -284,7 +284,7 @@ class BinFileHelper
DT_INT32
,
/* 32-bit Integer */
DT_UINT32
,
/* 32-bit Unsigned Integer */
DT_CHARV
,
/* Fixed-length array of characters */
DT_STR
,
/* Variable length array of characters, either terminated by
NULL
or by the limit on field size */
DT_STR
,
/* Variable length array of characters, either terminated by
nullptr
or by the limit on field size */
DT_SPCL
=
128
/* Flag indicating that the field requires special treatment (eg: Different bits may mean different things) */
};
...
...
kstars/auxiliary/filedownloader.h
View file @
827f5c2d
...
...
@@ -61,13 +61,13 @@ class FileDownloader : public QObject
QFile
m_DownloadedFile
;
// Network reply
QNetworkReply
*
m_Reply
=
NULL
;
QNetworkReply
*
m_Reply
=
nullptr
;
// Optional Progress dialog
bool
m_ShowProgressDialog
=
false
;
#ifndef KSTARS_LITE
QProgressDialog
*
progressDialog
=
NULL
;
QProgressDialog
*
progressDialog
=
nullptr
;
#endif
bool
isCancelled
=
false
;
QString
label
,
title
;
...
...
kstars/auxiliary/geolocation.h
View file @
827f5c2d
...
...
@@ -55,7 +55,7 @@ class GeoLocation
const
QString
&
name
=
"Nowhere"
,
const
QString
&
province
=
"Nowhere"
,
const
QString
&
country
=
"Nowhere"
,
double
TZ
=
0
,
TimeZoneRule
*
TZrule
=
NULL
,
bool
readOnly
=
false
,
int
iEllips
=
4
,
double
hght
=-
10
);
double
TZ
=
0
,
TimeZoneRule
*
TZrule
=
nullptr
,
bool
readOnly
=
false
,
int
iEllips
=
4
,
double
hght
=-
10
);
/** Constructor using doubles to specify X, Y and Z referred to the center of the Earth.
* @param x the x-position, in m
...
...
@@ -73,7 +73,7 @@ class GeoLocation
const
QString
&
name
=
"Nowhere"
,
const
QString
&
province
=
"Nowhere"
,
const
QString
&
country
=
"Nowhere"
,
double
TZ
=
0
,
TimeZoneRule
*
TZrule
=
NULL
,
bool
readOnly
=
false
,
int
iEllips
=
4
);
double
TZ
=
0
,
TimeZoneRule
*
TZrule
=
nullptr
,
bool
readOnly
=
false
,
int
iEllips
=
4
);
/** @return pointer to the longitude dms object */
const
CachingDms
*
lng
()
const
...
...
kstars/data/tools/binfile.h
View file @
827f5c2d
...
...
@@ -58,7 +58,7 @@ enum dataType
DT_INT32
,
/* 32-bit Integer */
DT_UINT32
,
/* 32-bit Unsigned Integer */
DT_CHARV
,
/* Fixed-length array of characters */
DT_STR
,
/* Variable length array of characters, either terminated by
NULL
or by the limit on field size */
DT_STR
,
/* Variable length array of characters, either terminated by
nullptr
or by the limit on field size */
DT_SPCL
=
128
/* Flag indicating that the field requires special treatment (eg: Different bits may mean different things) */
};
...
...
@@ -173,10 +173,9 @@ char * number2trixel(char * trixel, u_int16_t number)
int
str2int32
(
int32_t
*
i
,
const
char
*
str
,
int
ndec
)
{
double
dbl
;
if
(
i
==
NULL
)
if
(
i
==
nullptr
)
return
0
;
dbl
=
atof
(
str
);
...
...
@@ -184,7 +183,6 @@ int str2int32(int32_t * i, const char * str, int ndec)
*
i
=
(
int32_t
)(
round
(
dbl
*
pow
(
10
,
ndec
)));
return
1
;
}
/*
...
...
@@ -196,10 +194,9 @@ int str2int32(int32_t * i, const char * str, int ndec)
int
str2int16
(
int16_t
*
i
,
const
char
*
str
,
int
ndec
)
{
double
dbl
;
if
(
i
==
NULL
||
str
==
NULL
)
if
(
i
==
nullptr
||
str
==
nullptr
)
return
0
;
dbl
=
atof
(
str
);
...
...
@@ -218,21 +215,17 @@ int str2int16(int16_t * i, const char * str, int ndec)
int
str2charv
(
char
*
a
,
const
char
*
str
,
int
n
)
{
int
i
,
ret
;
if
(
a
==
NULL
||
str
==
NULL
)
if
(
a
==
nullptr
||
str
==
nullptr
)
return
0
;
ret
=
1
;
int
ret
=
1
;
for
(
i
=
0
;
i
<
n
;
++
i
)
for
(
int
i
=
0
;
i
<
n
;
++
i
)
{
a
[
i
]
=
((
ret
<
0
)
?
'\0'
:
str
[
i
]);
if
(
str
[
i
]
==
'\0'
)
/* We can do this safely because we aren't storing binary data in the DB */
if
(
str
[
i
]
==
'\0'
)
/* We can do this safely because we aren't storing binary data in the DB */
ret
=
-
1
;
}
return
ret
;
}
...
...
@@ -244,17 +237,15 @@ int str2charv(char * a, const char * str, int n)
int
isblank
(
char
*
str
)
{
if
(
str
==
NULL
)
if
(
str
==
nullptr
)
return
1
;
while
(
*
str
!=
'\0'
)
while
(
*
str
!=
'\0'
)
{
if
(
*
str
!=
' '
&&
*
str
!=
'\n'
&&
*
str
!=
'\r'
&&
*
str
!=
'\t'
)
return
0
;
++
str
;
}
return
1
;
}
...
...
@@ -271,8 +262,10 @@ int isblank(char * str)
int
writeDataElementDescription
(
FILE
*
f
,
char
*
name
,
int8_t
size
,
enum
dataType
type
,
int32_t
scale
)
{
struct
dataElement
de
;
if
(
f
==
NULL
||
name
==
NULL
)
if
(
f
==
nullptr
||
name
==
nullptr
)
return
0
;
str2charv
(
de
.
name
,
name
,
10
);
de
.
size
=
size
;
de
.
type
=
type
;
...
...
@@ -283,8 +276,7 @@ int writeDataElementDescription(FILE * f, char * name, int8_t size, enum dataTyp
int
writeIndexEntry
(
FILE
*
hf
,
u_int32_t
trixel_id
,
u_int32_t
offset
,
u_int32_t
nrec
)
{
if
(
hf
==
NULL
)
if
(
hf
==
nullptr
)
return
0
;
fwrite
(
&
trixel_id
,
4
,
1
,
hf
);
...
...
@@ -292,7 +284,7 @@ int writeIndexEntry(FILE * hf, u_int32_t trixel_id, u_int32_t offset, u_int32_t
fwrite
(
&
nrec
,
4
,
1
,
hf
);
/* Put this just for safety, in case we change our mind - we should avoid screwing things up */
if
(
4
+
4
+
4
!=
INDEX_ENTRY_SIZE
)
if
(
4
+
4
+
4
!=
INDEX_ENTRY_SIZE
)
{
fprintf
(
stderr
,
"CODE ERROR: 4 + 4 + 4 != INDEX_ENTRY_SIZE
\n
"
);
}
...
...
kstars/data/tools/nomadbinfile2mysql.cpp
View file @
827f5c2d
...
...
@@ -422,20 +422,20 @@ int main(int argc, char * argv[])
f
=
fopen
(
argv
[
1
],
"r"
);
if
(
f
==
NULL
)
if
(
f
==
nullptr
)
{
fprintf
(
stderr
,
"ERROR: Could not open file %s for binary read.
\n
"
,
argv
[
1
]);
return
1
;
}
/* Open the Database */
if
(
mysql_init
(
&
link
)
==
NULL
)
if
(
mysql_init
(
&
link
)
==
nullptr
)
{
fprintf
(
stderr
,
"ERROR: Failed to initialize MySQL connection!
\n
"
);
return
1
;
}
MYSQL
*
ret
;
ret
=
mysql_real_connect
(
&
link
,
"localhost"
,
argv
[
2
],
argv
[
3
],
db_name
,
0
,
NULL
,
0
);
ret
=
mysql_real_connect
(
&
link
,
"localhost"
,
argv
[
2
],
argv
[
3
],
db_name
,
0
,
nullptr
,
0
);
if
(
!
ret
)
{
...
...
kstars/dialogs/detaildialog.cpp
View file @
827f5c2d
...
...
@@ -809,7 +809,8 @@ void DetailDialog::viewLink()
{
QString
URL
;
if
(
m_CurrentLink
==
NULL
)
return
;
if
(
m_CurrentLink
==
nullptr
)
return
;
if
(
m_CurrentLink
->
listWidget
()
==
Links
->
InfoTitleList
)
{
...
...
@@ -853,10 +854,11 @@ void DetailDialog::updateButtons()
void
DetailDialog
::
editLinkDialog
()
{
int
type
=
0
,
row
=
0
;
int
type
=
0
,
row
=
0
;
QString
search_line
,
replace_line
,
currentItemTitle
,
currentItemURL
;
if
(
m_CurrentLink
==
NULL
)
return
;
if
(
m_CurrentLink
==
nullptr
)
return
;
QDialog
editDialog
(
this
);
editDialog
.
setWindowTitle
(
i18n
(
"Edit Link"
)
);
...
...
@@ -968,7 +970,8 @@ void DetailDialog::removeLinkDialog()
TempFile
.
open
();
TempFileName
=
TempFile
.
fileName
();
if
(
m_CurrentLink
==
NULL
)
return
;
if
(
m_CurrentLink
==
nullptr
)
return
;
if
(
m_CurrentLink
->
listWidget
()
==
Links
->
InfoTitleList
)
{
...
...
@@ -1028,7 +1031,8 @@ void DetailDialog::updateLocalDatabase(int type, const QString &search_line, con
QTemporaryFile
TempFile
;
TempFile
.
setAutoRemove
(
false
);
TempFile
.
open
();
QTextStream
*
temp_stream
=
NULL
,
*
out_stream
=
NULL
;
QTextStream
*
temp_stream
=
nullptr
;
QTextStream
*
out_stream
=
nullptr
;
bool
replace
=
!
replace_line
.
isEmpty
();
if
(
search_line
.
isEmpty
())
...
...
@@ -1091,7 +1095,8 @@ void DetailDialog::updateLocalDatabase(int type, const QString &search_line, con
void
DetailDialog
::
populateADVTree
()
{
QTreeWidgetItem
*
parent
=
NULL
,
*
temp
=
NULL
;
QTreeWidgetItem
*
parent
=
nullptr
;
QTreeWidgetItem
*
temp
=
nullptr
;
// We populate the tree iterativley, keeping track of parents as we go
// This solution is more efficient than the previous recursion algorithm.
...
...
@@ -1103,7 +1108,7 @@ void DetailDialog::populateADVTree()
// Top Level
case
0
:
temp
=
new
QTreeWidgetItem
(
parent
,
QStringList
(
item
->
Name
));
if
(
parent
==
NULL
)
if
(
parent
==
nullptr
)
Adv
->
ADVTree
->
addTopLevelItem
(
temp
);
parent
=
temp
;
...
...
@@ -1111,7 +1116,8 @@ void DetailDialog::populateADVTree()
// End of top level
case
1
:
if
(
parent
!=
NULL
)
parent
=
parent
->
parent
();
if
(
parent
!=
nullptr
)
parent
=
parent
->
parent
();
break
;
// Leaf
...
...
@@ -1219,7 +1225,7 @@ void DetailDialog::centerTelescope()
if
(
gd
->
getType
()
!=
KSTARS_TELESCOPE
)
continue
;
if
(
bd
==
NULL
)
if
(
bd
==
nullptr
)
continue
;
if
(
bd
->
isConnected
()
==
false
)
...
...
kstars/dialogs/locationdialog.cpp
View file @
827f5c2d
...
...
@@ -46,7 +46,7 @@ LocationDialog::LocationDialog( QWidget * parent ) :
#endif
KStarsData
*
data
=
KStarsData
::
Instance
();
SelectedCity
=
NULL
;
SelectedCity
=
nullptr
;
ld
=
new
LocationDialogUI
(
this
);
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
;
...
...
@@ -259,16 +259,15 @@ bool LocationDialog::addCity()
bool
LocationDialog
::
updateCity
()
{
if
(
SelectedCity
==
NULL
)
if
(
SelectedCity
==
nullptr
)
return
false
;
return
updateCity
(
CITY_UPDATE
);
}
bool
LocationDialog
::
removeCity
()
{
if
(
SelectedCity
==
NULL
)
if
(
SelectedCity
==
nullptr
)
return
false
;
return
updateCity
(
CITY_REMOVE
);
...
...
@@ -362,7 +361,7 @@ bool LocationDialog::updateCity(CityOperation operation)
QString
province
=
ld
->
NewProvinceName
->
text
().
trimmed
();
QString
country
=
ld
->
NewCountryName
->
text
().
trimmed
();
QString
TZrule
=
ld
->
DSTRuleBox
->
currentText
();
GeoLocation
*
g
=
NULL
;
GeoLocation
*
g
=
nullptr
;
switch
(
operation
)
{
...
...
@@ -440,8 +439,8 @@ bool LocationDialog::updateCity(CityOperation operation)
filteredCityList
.
removeOne
(
g
);
KStarsData
::
Instance
()
->
getGeoList
().
removeOne
(
g
);
delete
(
g
)
;
g
=
NULL
;
delete
g
;
g
=
nullptr
;
}
break
;
}
...
...
kstars/ekos/align/align.cpp
View file @
827f5c2d
...
...
@@ -77,9 +77,9 @@ Align::Align()
focusState
=
FOCUS_IDLE
;
pahStage
=
PAH_IDLE
;
currentCCD
=
NULL
;
currentTelescope
=
NULL
;
currentFilter
=
NULL
;
currentCCD
=
nullptr
;
currentTelescope
=
nullptr
;
currentFilter
=
nullptr
;
useGuideHead
=
false
;
canSync
=
false
;
//loadSlewMode = false;
...
...
@@ -93,7 +93,7 @@ Align::Align()
decDeviation
=
azDeviation
=
altDeviation
=
0
;
rememberUploadMode
=
ISD
::
CCD
::
UPLOAD_CLIENT
;
currentFilter
=
NULL
;
currentFilter
=
nullptr
;
filterPositionPending
=
false
;
lockedFilterIndex
=
currentFilterIndex
=
-
1
;
retries
=
0
;
...
...
@@ -101,12 +101,12 @@ Align::Align()
solverIterations
=
0
;
fov_x
=
fov_y
=
fov_pixscale
=
0
;
parser
=
NULL
;
parser
=
nullptr
;
solverFOV
=
new
FOV
();
solverFOV
->
setColor
(
KStars
::
Instance
()
->
data
()
->
colorScheme
()
->
colorNamed
(
"SolverFOVColor"
).
name
());
onlineParser
=
NULL
;
offlineParser
=
NULL
;
remoteParser
=
NULL
;
onlineParser
=
nullptr
;
offlineParser
=
nullptr
;
remoteParser
=
nullptr
;
showFITSViewerB
->
setIcon
(
QIcon
::
fromTheme
(
"kstars_fitsviewer"
,
QIcon
(
":/icons/breeze/default/kstars_fitsviewer.svg"
)));
showFITSViewerB
->
setAttribute
(
Qt
::
WA_LayoutUsesWidgetRect
);
...
...
@@ -450,7 +450,7 @@ Align::~Align()
delete
(
solverFOV
);
delete
(
parser
);
if
(
alignWidget
->
parent
()
==
NULL
)
if
(
alignWidget
->
parent
()
==
nullptr
)
toggleAlignWidgetFullScreen
();
// Remove temporary FITS files left before by the solver
...
...
@@ -864,7 +864,7 @@ const SkyObject * Align::getWizardAlignObject(double ra, double dec)
if
(
mountModel
.
alignTypeBox
->
currentText
()
==
"Any Object"
)
return
KStarsData
::
Instance
()
->
skyComposite
()
->
objectNearest
(
new
SkyPoint
(
dms
(
ra
),
dms
(
dec
)),
maxSearch
);
else
if
(
mountModel
.
alignTypeBox
->
currentText
()
==
"Fixed DEC"
||
mountModel
.
alignTypeBox
->
currentText
()
==
"Fixed Grid"
)
return
NULL
;
return
nullptr
;
else
if
(
mountModel
.
alignTypeBox
->
currentText
()
==
"Any Stars"
)
return
KStarsData
::
Instance
()
->
skyComposite
()
->
starNearest
(
new
SkyPoint
(
dms
(
ra
),
dms
(
dec
)),
maxSearch
);
...
...
@@ -1120,7 +1120,7 @@ bool Align::loadAlignmentPoints(const QString &fileURL)
LilXML
*
xmlParser
=
newLilXML
();
char
errmsg
[
MAXRBUF
];
XMLEle
*
root
=
NULL
;
XMLEle
*
root
=
nullptr
;
char
c
;
while
(
sFile
.
getChar
(
&
c
))
...
...
@@ -1136,12 +1136,12 @@ bool Align::loadAlignmentPoints(const QString &fileURL)
return
false
;
}
XMLEle
*
ep
=
NULL
;
XMLEle
*
subEP
=
NULL
;
XMLEle
*
ep
=
nullptr
;
XMLEle
*
subEP
=
nullptr
;
int
currentRow
=
0
;
for
(
ep
=
nextXMLEle
(
root
,
1
)
;
ep
!=
NULL
;
ep
=
nextXMLEle
(
root
,
0
))
for
(
ep
=
nextXMLEle
(
root
,
1
)
;
ep
!=
nullptr
;
ep
=
nextXMLEle
(
root
,
0
))
{
if
(
!
strcmp
(
tagXMLEle
(
ep
),
"AlignmentPoint"
))
{
...
...
@@ -1789,7 +1789,7 @@ void Align::setSolverType(int type)
{
case
SOLVER_ONLINE
:
loadSlewB
->
setEnabled
(
true
);
if
(
onlineParser
!=
NULL
)
if
(
onlineParser
!=
nullptr
)
{
parser
=
onlineParser
;
return
;
...
...
@@ -1801,10 +1801,9 @@ void Align::setSolverType(int type)
case
SOLVER_OFFLINE
:
loadSlewB
->
setEnabled
(
true
);
if
(
offlineParser
!=
NULL
)
if
(
offlineParser
!=
nullptr
)
{
parser
=
offlineParser
;
return
;
}
...
...
@@ -1814,7 +1813,7 @@ void Align::setSolverType(int type)
case
SOLVER_REMOTE
:
loadSlewB
->
setEnabled
(
true
);
if
(
remoteParser
!=
NULL
)
if
(
remoteParser
!=
nullptr
)
{
parser
=
remoteParser
;
(
dynamic_cast
<
RemoteAstrometryParser
*>
(
parser
))
->
setAstrometryDevice
(
remoteParserDevice
);
...
...
@@ -1906,7 +1905,7 @@ void Align::setTelescope(ISD::GDInterface * newTelescope)
void
Align
::
syncTelescopeInfo
()
{
if
(
currentTelescope
==
NULL
)
if
(
currentTelescope
==
nullptr
)
return
;
canSync
=
currentTelescope
->
canSync
();
...
...
@@ -1925,9 +1924,8 @@ void Align::syncTelescopeInfo()
if
(
nvp
)
{
INumber
*
np
=
NULL
;
INumber
*
np
=
IUFindNumber
(
nvp
,
"TELESCOPE_APERTURE"
)
;
np
=
IUFindNumber
(
nvp
,
"TELESCOPE_APERTURE"
);
if
(
np
&&
np
->
value
>
0
)
primaryAperture
=
np
->
value
;
...
...
@@ -1976,9 +1974,9 @@ void Align::syncTelescopeInfo()
void
Align
::
syncCCDInfo
()
{
INumberVectorProperty
*
nvp
=
NULL
;
INumberVectorProperty
*
nvp
=
nullptr
;
if
(
currentCCD
==
NULL
)
if
(
currentCCD
==
nullptr
)
return
;
if
(
useGuideHead
)
...
...
@@ -2009,7 +2007,7 @@ void Align::syncCCDInfo()
targetChip
->
setImageView
(
alignView
,
FITS_ALIGN
);
targetChip
->
getFrameMinMax
(
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
&
ccd_width
,
NULL
,
&
ccd_height
);
targetChip
->
getFrameMinMax
(
nullptr
,
nullptr
,
nullptr
,
nullptr
,
nullptr
,
&
ccd_width
,
nullptr
,
&
ccd_height
);
//targetChip->getFrame(&x,&y,&ccd_width,&ccd_height);
binningCombo
->
setEnabled
(
targetChip
->
canBin
());
if
(
targetChip
->
canBin
())
...
...
@@ -2283,7 +2281,7 @@ bool Align::captureAndSolve()
{
//m_isSolverComplete = false;
if
(
currentCCD
==
NULL
)
if
(
currentCCD
==
nullptr
)
return
false
;
if
(
currentCCD
->
isConnected
()
==
false
)
...
...
@@ -2308,7 +2306,7 @@ bool Align::captureAndSolve()
return
false
;
}
if
(
currentFilter
!=
NULL
&&
lockedFilterIndex
!=
-
1
)
if
(
currentFilter
!=
nullptr
&&
lockedFilterIndex
!=
-
1
)
{
if
(
lockedFilterIndex
!=
currentFilterIndex
)
{
...
...
@@ -2506,7 +2504,7 @@ void Align::newFITS(IBLOB * bp)
targetChip
->
getFrame
(
&
x
,
&
y
,
&
w
,
&
h
);
targetChip
->
getBinning
(
&
binx
,
&
biny
);
FITSData
*
darkData
=
NULL
;
FITSData
*
darkData
=
nullptr
;
uint16_t
offsetX
=
x
/
binx
;
uint16_t
offsetY
=
y
/
biny
;
...
...
@@ -3892,10 +3890,9 @@ void Align::setFOVTelescopeType(int index)
FOV
*
Align
::
fov
()
{
if
(
sOrientation
==
-
1
)
return
NULL
;
return
nullptr
;
else
return
solverFOV
;
}
void
Align
::
setLockedFilter
(
ISD
::
GDInterface
*
filter
,
int
lockedPosition
)
...
...
@@ -3932,7 +3929,7 @@ void Align::processFilterNumber(INumberVectorProperty * nvp)
void
Align
::
setWCSEnabled
(
bool
enable
)
{
if
(
currentCCD
==
NULL
)
if
(
currentCCD
==
nullptr
)
return
;
ISwitchVectorProperty
*
wcsControl
=
currentCCD
->
getBaseDevice
()
->
getSwitch
(
"WCS_CONTROL"
);
...
...
@@ -3993,7 +3990,7 @@ QStringList Align::getSolverOptionsFromFITS(const QString &filename)
{
int
status
=
0
,
fits_ccd_width
,
fits_ccd_height
,
fits_focal_length
=
-
1
,
fits_binx
=
1
,
fits_biny
=
1
;
char
comment
[
128
],
error_status
[
512
];
fitsfile
*
fptr
=
NULL
;
fitsfile
*
fptr
=
nullptr
;
double
ra
=
0
,
dec
=
0
,
fits_fov_x
,
fits_fov_y
,
fov_lower
,
fov_upper
,
fits_ccd_hor_pixel
=
-
1
,
fits_ccd_ver_pixel
=
-
1
;