Skip to content

Commit 9812c48

Browse files
committed
bugfix undefined symbol
Occurred when was disabled tom and enabled orm.
1 parent c6f06d6 commit 9812c48

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

include/orm/tiny/utils/string.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ namespace Orm::Tiny::Utils
3535
/*! Convert a value to studly caps case. */
3636
static QString studly(QString string);
3737

38-
#ifndef TINYORM_DISABLE_TOM
38+
#if !defined(TINYORM_DISABLE_TOM) || !defined(TINYORM_DISABLE_ORM)
3939
/*! Check if the given string is the number, signed or unsigned. */
4040
static bool isNumber(QStringView string, bool allowFloating = false);
41+
#endif
4142

43+
#if !defined(TINYORM_DISABLE_TOM)
4244
/*! Split a string by the given width (not in the middle of a word). */
4345
static std::vector<QString>
4446
splitStringByWidth(const QString &string, int width);

src/orm/tiny/utils/string.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ QString String::studly(QString string)
113113
return (*studlyCache)[std::move(key)] = value.replace(SPACE, "");
114114
}
115115

116-
#ifndef TINYORM_DISABLE_TOM
116+
#if !defined(TINYORM_DISABLE_TOM) || !defined(TINYORM_DISABLE_ORM)
117117
bool String::isNumber(const QStringView string, const bool allowFloating)
118118
{
119119
/* Performance boost was amazing after the QRegularExpression has been removed,
@@ -150,7 +150,9 @@ bool String::isNumber(const QStringView string, const bool allowFloating)
150150

151151
return nonDigit == string.cend();
152152
}
153+
#endif
153154

155+
#ifndef TINYORM_DISABLE_TOM
154156
namespace
155157
{
156158
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)

0 commit comments

Comments
 (0)