mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
f1648d297b
Add copy_txt function to qPrefPrivate class Remove macro COPY_TXT from qPrefPrivate.h Replace use of COPY_TXT with copy_txt in qPref classes copy_txt is only once, COPY_TXT was expanded approx. 160 times, so this commit saves space (and removes a macro). Signed-off-by: Jan Iversen <jani@apache.org>
18 lines
362 B
C++
18 lines
362 B
C++
// SPDX-License-Identifier: GPL-2.0
|
|
#include "qPrefPrivate.h"
|
|
|
|
qPrefPrivate::qPrefPrivate(QObject *parent) : QObject(parent)
|
|
{
|
|
}
|
|
qPrefPrivate *qPrefPrivate::instance()
|
|
{
|
|
static qPrefPrivate *self = new qPrefPrivate;
|
|
return self;
|
|
}
|
|
|
|
void qPrefPrivate::copy_txt(const char **name, const QString& string)
|
|
{
|
|
free((void *)*name);
|
|
*name = copy_qstring(string);
|
|
}
|
|
|