Skip to content

Commit ec83b2d

Browse files
committed
Util: Remove unused loadString()
1 parent 37f9bab commit ec83b2d

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

src/util/util.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,9 @@
2222
#include "util.h"
2323

2424
#include <QtGlobal>
25-
#include <QChar>
26-
#include <QIODevice>
2725
#include <QObject>
2826
#include <QObjectList>
2927
#include <QRect>
30-
#include <QString>
3128

3229
#include "core/map_coord.h"
3330

@@ -192,20 +189,6 @@ bool isPointOnSegment(const MapCoordF& seg_start, const MapCoordF& seg_end, cons
192189
return ok && param >= 0 && param <= 1;
193190
}
194191

195-
void loadString(QIODevice* file, QString& str)
196-
{
197-
int length;
198-
199-
file->read((char*)&length, sizeof(int));
200-
if (length > 0)
201-
{
202-
str.resize(length);
203-
file->read((char*)str.data(), length * sizeof(QChar));
204-
}
205-
else
206-
str.clear();
207-
}
208-
209192

210193
void Util::hatchingOperation(const QRectF& extent, double spacing, double offset, double rotation,
211194
std::function<void (const QPointF&, const QPointF&)>& process_line)

src/util/util.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@
3030
#include <QPointF>
3131
#include <QRectF>
3232

33-
class QIODevice;
3433
class QObject;
3534
class QRect;
36-
class QString;
3735
// IWYU pragma: no_forward_declare QPointF
3836
// IWYU pragma: no_forward_declare QRectF
3937

@@ -161,10 +159,6 @@ double parameterOfPointOnLine(double x0, double y0, double dx, double dy, double
161159
bool isPointOnSegment(const MapCoordF& seg_start, const MapCoordF& seg_end, const MapCoordF& point);
162160

163161

164-
/** Helper functions to save a string to a file and load it again. */
165-
void loadString(QIODevice* file, QString& str);
166-
167-
168162
// TODO: Refactor: put remaining stuff into this namespace, too
169163
namespace Util
170164
{

0 commit comments

Comments
 (0)