From 9e8c0c936645e9cd5b9f0a34f305cdcf81f2ed2c Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Sat, 10 May 2014 22:18:37 -0300 Subject: [PATCH] Prefix a method with 'dive_' because it should work only with dives I'll probably add prefixes to functions to make it easier to find method via autocomplete from the grep or interface helpers, do you wanna know all the functions that works with a dive? ask for the completion for dive_, do you wanna know all the functions that works with a divelist? ask for the completions on divelist_ or run grep -rIs divelist_ on the header files. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- dive.c | 2 +- dive.h | 2 +- qthelper.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dive.c b/dive.c index 9c3ab79b2..0c4b91fb3 100644 --- a/dive.c +++ b/dive.c @@ -955,7 +955,7 @@ struct dive *fixup_dive(struct dive *dive) weightsystem_t *ws = dive->weightsystem + i; add_weightsystem_description(ws); } - dive->id = getUniqID(dive); + dive->id = dive_getUniqID(dive); return dive; } diff --git a/dive.h b/dive.h index af7a4e265..31115dfdb 100644 --- a/dive.h +++ b/dive.h @@ -525,7 +525,7 @@ extern bool has_hr_data(struct divecomputer *dc); extern void sort_table(struct dive_table *table); extern struct dive *fixup_dive(struct dive *dive); -extern int getUniqID(struct dive *d); +extern int dive_getUniqID(struct dive *d); extern unsigned int dc_airtemp(struct divecomputer *dc); extern unsigned int dc_watertemp(struct divecomputer *dc); extern struct dive *merge_dives(struct dive *a, struct dive *b, int offset, bool prefer_downloaded); diff --git a/qthelper.cpp b/qthelper.cpp index 2cecb9774..a5e450eff 100644 --- a/qthelper.cpp +++ b/qthelper.cpp @@ -260,7 +260,7 @@ QList getDivesInTrip(dive_trip_t *trip) // it doesn't change during the life time of a Subsurface session // oh, and it has no meaning whatsoever - that's why we have the // silly initial number and increment by 3 :-) -int getUniqID(struct dive *d) +int dive_getUniqID(struct dive *d) { static QSet ids; static int maxId = 83529;