mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Coding style: remove Java-style function definition
Remove a few cases of void fun() { ... } While touching these functions, fix a few other whitespace coding style violations. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
73a230b6e6
commit
9ed5cf16a4
10 changed files with 31 additions and 18 deletions
|
@ -526,7 +526,8 @@ void dump_tissues(struct deco_state *ds)
|
|||
}
|
||||
#endif
|
||||
|
||||
void clear_vpmb_state(struct deco_state *ds) {
|
||||
void clear_vpmb_state(struct deco_state *ds)
|
||||
{
|
||||
int ci;
|
||||
for (ci = 0; ci < 16; ci++) {
|
||||
ds->max_n2_crushing_pressure[ci] = 0.0;
|
||||
|
|
|
@ -26,6 +26,7 @@ int report_error(const char *fmt, ...)
|
|||
return -1;
|
||||
}
|
||||
|
||||
void set_error_cb(void(*cb)(char *)) {
|
||||
void set_error_cb(void(*cb)(char *))
|
||||
{
|
||||
error_cb = cb;
|
||||
}
|
||||
|
|
|
@ -124,7 +124,8 @@ int evn_allocated;
|
|||
int evn_used;
|
||||
|
||||
#if WE_DONT_USE_THIS /* we need to implement event filters in Qt */
|
||||
int evn_foreach (void (*callback)(const char *, bool *, void *), void *data) {
|
||||
int evn_foreach (void (*callback)(const char *, bool *, void *), void *data)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < evn_used; i++) {
|
||||
|
|
|
@ -242,7 +242,8 @@ ColumnNameResult::ColumnNameResult(QObject *parent) : QAbstractTableModel(parent
|
|||
|
||||
}
|
||||
|
||||
void ColumnNameResult::swapValues(int firstIndex, int secondIndex) {
|
||||
void ColumnNameResult::swapValues(int firstIndex, int secondIndex)
|
||||
{
|
||||
QString one = columnNames[firstIndex];
|
||||
QString two = columnNames[secondIndex];
|
||||
setData(index(0, firstIndex), QVariant(two), Qt::EditRole);
|
||||
|
|
|
@ -213,13 +213,15 @@ void FilterWidget2::updateFilter()
|
|||
filterDataChanged(filterData);
|
||||
}
|
||||
|
||||
void FilterWidget2::updateLogged(int value) {
|
||||
void FilterWidget2::updateLogged(int value)
|
||||
{
|
||||
if (value == Qt::Unchecked)
|
||||
ui.planned->setChecked(true);
|
||||
updateFilter();
|
||||
}
|
||||
|
||||
void FilterWidget2::updatePlanned(int value) {
|
||||
void FilterWidget2::updatePlanned(int value)
|
||||
{
|
||||
if (value == Qt::Unchecked)
|
||||
ui.logged->setChecked(true);
|
||||
updateFilter();
|
||||
|
|
|
@ -403,11 +403,11 @@ void MainWindow::enableDisableOtherDCsActions()
|
|||
ui.actionPreviousDC->setEnabled(nr);
|
||||
}
|
||||
|
||||
void MainWindow::setDefaultState() {
|
||||
void MainWindow::setDefaultState()
|
||||
{
|
||||
setApplicationState("Default");
|
||||
if (mainTab->getEditMode() != MainTab::NONE) {
|
||||
if (mainTab->getEditMode() != MainTab::NONE)
|
||||
ui.bottomLeft->currentWidget()->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
MainWindow *MainWindow::instance()
|
||||
|
@ -437,7 +437,8 @@ void MainWindow::recreateDiveList()
|
|||
MultiFilterSortModel::instance()->myInvalidate();
|
||||
}
|
||||
|
||||
void MainWindow::configureToolbar() {
|
||||
void MainWindow::configureToolbar()
|
||||
{
|
||||
if (current_dive) {
|
||||
bool freeDiveMode = current_dive->dc.divemode == FREEDIVE;
|
||||
ui.profCalcCeiling->setDisabled(freeDiveMode);
|
||||
|
@ -1839,7 +1840,8 @@ void MainWindow::registerApplicationState(const QByteArray& state, QWidget *topL
|
|||
}
|
||||
}
|
||||
|
||||
void MainWindow::setApplicationState(const QByteArray& state) {
|
||||
void MainWindow::setApplicationState(const QByteArray &state)
|
||||
{
|
||||
if (!applicationState.keys().contains(state))
|
||||
return;
|
||||
|
||||
|
|
|
@ -1195,9 +1195,9 @@ void MainTab::escDetected()
|
|||
setFocus();
|
||||
}
|
||||
|
||||
void MainTab::clearTabs() {
|
||||
for (auto widget : extraWidgets) {
|
||||
void MainTab::clearTabs()
|
||||
{
|
||||
for (auto widget: extraWidgets)
|
||||
widget->clear();
|
||||
}
|
||||
clearEquipment();
|
||||
}
|
||||
|
|
|
@ -128,7 +128,8 @@ void UserManual::linkClickedSlot(const QUrl& url)
|
|||
}
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
void UserManual::showEvent(QShowEvent *e) {
|
||||
void UserManual::showEvent(QShowEvent *e)
|
||||
{
|
||||
MainWindow *m = MainWindow::instance();
|
||||
filterAction = m->findChild<QAction *>(QLatin1String("actionFilterTags"), Qt::FindDirectChildrenOnly);
|
||||
if (filterAction != nullptr)
|
||||
|
@ -137,7 +138,9 @@ void UserManual::showEvent(QShowEvent *e) {
|
|||
if (closeAction != nullptr)
|
||||
closeAction->setShortcut(QKeySequence());
|
||||
}
|
||||
void UserManual::hideEvent(QHideEvent *e) {
|
||||
|
||||
void UserManual::hideEvent(QHideEvent *e)
|
||||
{
|
||||
if (closeAction != NULL)
|
||||
closeAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_W));
|
||||
if (filterAction != NULL)
|
||||
|
|
|
@ -638,7 +638,8 @@ void DiveMeanDepthItem::paint(QPainter *painter, const QStyleOptionGraphicsItem*
|
|||
connect(qPrefTechnicalDetails::instance(), &qPrefTechnicalDetails::show_average_depthChanged, this, &DiveAmbPressureItem::setVisible);
|
||||
}
|
||||
|
||||
void DiveMeanDepthItem::createTextItem() {
|
||||
void DiveMeanDepthItem::createTextItem()
|
||||
{
|
||||
plot_data *entry = dataModel->data().entry;
|
||||
int sec = entry[dataModel->rowCount()-1].sec;
|
||||
qDeleteAll(texts);
|
||||
|
|
|
@ -645,7 +645,8 @@ static struct types_list *smtk_index_list(MdbHandle *mdb, char *table_name, char
|
|||
* Buddy table format:
|
||||
* | Idx | Text (nickname) | Name | Firstname | Middlename | Title | Picture | Phone | ...
|
||||
*/
|
||||
static void smtk_build_buddies(MdbHandle *mdb, char *array[]) {
|
||||
static void smtk_build_buddies(MdbHandle *mdb, char *array[])
|
||||
{
|
||||
MdbTableDef *table;
|
||||
MdbColumn *col[MDB_MAX_COLS];
|
||||
char *bound_values[MDB_MAX_COLS], *fullname = NULL, *str = NULL;
|
||||
|
|
Loading…
Reference in a new issue