mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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:
parent
ee839bf686
commit
8391d926c7
13 changed files with 17 additions and 17 deletions
|
@ -12,7 +12,7 @@
|
|||
#include "core/divesite.h"
|
||||
#include "exportfuncs.h"
|
||||
|
||||
void exportProfile(QString filename, const bool selected_only)
|
||||
void exportProfile(QString filename, bool selected_only)
|
||||
{
|
||||
struct dive *dive;
|
||||
int i;
|
||||
|
@ -33,7 +33,7 @@ void exportProfile(QString filename, const bool selected_only)
|
|||
}
|
||||
|
||||
|
||||
void export_TeX(const char *filename, const bool selected_only, bool plain)
|
||||
void export_TeX(const char *filename, bool selected_only, bool plain)
|
||||
{
|
||||
FILE *f;
|
||||
QDir texdir = QFileInfo(filename).dir();
|
||||
|
@ -233,7 +233,7 @@ void export_TeX(const char *filename, const bool selected_only, bool plain)
|
|||
|
||||
}
|
||||
|
||||
void export_depths(const char *filename, const bool selected_only)
|
||||
void export_depths(const char *filename, bool selected_only)
|
||||
{
|
||||
FILE *f;
|
||||
struct dive *dive;
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
struct dive_site;
|
||||
|
||||
void exportProfile(QString filename, const bool selected_only);
|
||||
void export_TeX(const char *filename, const bool selected_only, bool plain);
|
||||
void export_depths(const char *filename, const bool selected_only);
|
||||
void exportProfile(QString filename, bool selected_only);
|
||||
void export_TeX(const char *filename, bool selected_only, bool plain);
|
||||
void export_depths(const char *filename, bool selected_only);
|
||||
std::vector<const dive_site *> getDiveSitesToExport(bool selectedOnly);
|
||||
QFuture<int> exportUsingStyleSheet(QString filename, bool doExport, int units, QString stylesheet, bool anonymize);
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ QAction *redoAction(QObject *parent); // Create an redo action.
|
|||
// distance are added to a trip. dive d is consumed (the structure is reset)!
|
||||
// If newNumber is true, the dive is assigned a new number, depending on the
|
||||
// insertion position.
|
||||
void addDive(dive *d, const bool autogroup, bool newNumber);
|
||||
void addDive(dive *d, bool autogroup, bool newNumber);
|
||||
void importDives(struct dive_table *dives, struct trip_table *trips,
|
||||
struct dive_site_table *sites, int flags, const QString &source); // The tables are consumed!
|
||||
void deleteDive(const QVector<struct dive*> &divesToDelete);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -637,7 +637,7 @@ QString TextHyperlinkEventFilter::tryToFormulateUrl(QTextCursor *cursor)
|
|||
return stringMeetsOurUrlRequirements(maybeUrlStr) ? maybeUrlStr : QString();
|
||||
}
|
||||
|
||||
QString TextHyperlinkEventFilter::fromCursorTilWhitespace(QTextCursor *cursor, const bool searchBackwards)
|
||||
QString TextHyperlinkEventFilter::fromCursorTilWhitespace(QTextCursor *cursor, bool searchBackwards)
|
||||
{
|
||||
// fromCursorTilWhitespace calls cursor->movePosition repeatedly, while
|
||||
// preserving the original 'anchor' (qt terminology) of the cursor.
|
||||
|
|
|
@ -156,7 +156,7 @@ private:
|
|||
void handleUrlClick(const QString &urlStr);
|
||||
void handleUrlTooltip(const QString &urlStr, const QPoint &pos);
|
||||
bool stringMeetsOurUrlRequirements(const QString &maybeUrlStr);
|
||||
QString fromCursorTilWhitespace(QTextCursor *cursor, const bool searchBackwards);
|
||||
QString fromCursorTilWhitespace(QTextCursor *cursor, bool searchBackwards);
|
||||
QString tryToFormulateUrl(QTextCursor *cursor);
|
||||
|
||||
QTextEdit const *const textEdit;
|
||||
|
|
Loading…
Reference in a new issue