Cleanup: remove const bool parameters and return types

These just make no sense. Since the value is copied, it
has no meaning to the caller whether the function can
change the value (and vice versa for return types).

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-02-06 22:56:10 +01:00 committed by Dirk Hohndel
parent ee839bf686
commit 8391d926c7
13 changed files with 17 additions and 17 deletions

View file

@ -315,7 +315,7 @@ extern void set_filename(const char *filename);
extern int save_dives(const char *filename);
extern int save_dives_logic(const char *filename, bool select_only, bool anonymize);
extern int save_dive(FILE *f, struct dive *dive, bool anonymize);
extern int export_dives_xslt(const char *filename, const bool selected, const int units, const char *export_xslt, bool anonymize);
extern int export_dives_xslt(const char *filename, bool selected, const int units, const char *export_xslt, bool anonymize);
extern int save_dive_sites_logic(const char *filename, const struct dive_site *sites[], int nr_sites, bool anonymize);

View file

@ -344,7 +344,7 @@ void put_HTML_tags(struct membuffer *b, struct dive *dive, const char *pre, cons
}
/* if exporting list_only mode, we neglect exporting the samples, bookmarks and cylinders */
void write_one_dive(struct membuffer *b, struct dive *dive, const char *photos_dir, int *dive_no, const bool list_only)
void write_one_dive(struct membuffer *b, struct dive *dive, const char *photos_dir, int *dive_no, bool list_only)
{
put_string(b, "{");
put_format(b, "\"number\":%d,", *dive_no);

View file

@ -239,7 +239,7 @@ void save_subtitles_buffer(struct membuffer *b, struct dive *dive, int offset, i
free_plot_info_data(&pi);
}
int save_profiledata(const char *filename, const bool select_only)
int save_profiledata(const char *filename, bool select_only)
{
struct membuffer buf = { 0 };
FILE *f;

View file

@ -595,7 +595,7 @@ int save_dives(const char *filename)
return save_dives_logic(filename, false, false);
}
static void save_dives_buffer(struct membuffer *b, const bool select_only, bool anonymize)
static void save_dives_buffer(struct membuffer *b, bool select_only, bool anonymize)
{
int i;
struct dive *dive;

View file

@ -61,7 +61,7 @@ void uploadDiveLogsDE::doUpload(bool selected, const QString &userid, const QStr
}
bool uploadDiveLogsDE::prepareDives(const QString &tempfile, const bool selected)
bool uploadDiveLogsDE::prepareDives(const QString &tempfile, bool selected)
{
static const char errPrefix[] = "divelog.de-upload:";
#ifndef SUBSURFACE_MOBILE

View file

@ -30,7 +30,7 @@ private:
void uploadDives(const QString &filename, const QString &userid, const QString &password);
// only to be used in desktop-widgets::subsurfacewebservices
bool prepareDives(const QString &tempfile, const bool selected);
bool prepareDives(const QString &tempfile, bool selected);
QNetworkReply *reply;
QHttpMultiPart *multipart;

View file

@ -24,7 +24,7 @@ char *getGoogleApi()
return "https://maps.googleapis.com/maps/api/js?";
}
void writeMarkers(struct membuffer *b, const bool selected_only)
void writeMarkers(struct membuffer *b, bool selected_only)
{
int i, dive_no = 0;
struct dive *dive;

View file

@ -6,7 +6,7 @@
extern "C" {
#endif
extern void export_worldmap_HTML(const char *file_name, const bool selected_only);
extern void export_worldmap_HTML(const char *file_name, bool selected_only);
#ifdef __cplusplus
}