Skip to content

Commit

Permalink
bugfix undefined symbol
Browse files Browse the repository at this point in the history
Occurred when was disabled tom and enabled orm.
  • Loading branch information
silverqx committed Jun 8, 2022
1 parent c6f06d6 commit 9812c48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion include/orm/tiny/utils/string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ namespace Orm::Tiny::Utils
/*! Convert a value to studly caps case. */
static QString studly(QString string);

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

#if !defined(TINYORM_DISABLE_TOM)
/*! Split a string by the given width (not in the middle of a word). */
static std::vector<QString>
splitStringByWidth(const QString &string, int width);
Expand Down
4 changes: 3 additions & 1 deletion src/orm/tiny/utils/string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ QString String::studly(QString string)
return (*studlyCache)[std::move(key)] = value.replace(SPACE, "");
}

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

return nonDigit == string.cend();
}
#endif

#ifndef TINYORM_DISABLE_TOM
namespace
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
Expand Down

0 comments on commit 9812c48

Please sign in to comment.