Added stdc++ and m to fix compiling issues

This commit is contained in:
2019-04-19 21:15:26 +02:00
parent 99d8c7386d
commit c25ebec4a9
2 changed files with 4 additions and 4 deletions

View File

@@ -11,4 +11,4 @@ set(SOURCES
add_executable(picsync ${HEADERS} ${SOURCES})
target_link_libraries(picsync Qt5::Core dbcorelib)
target_link_libraries(picsync stdc++ m Qt5::Core dbcorelib)

View File

@@ -28,9 +28,9 @@ bool writeBitmap(const QString &filename, const QByteArray &content)
return false;
}
const quint64 pixels = qCeil(content.length() / 4.0);
const quint32 width = qSqrt(pixels);
const quint32 height = qCeil(pixels / (qreal)width);
const quint64 pixels = std::ceil(content.length() / 4.0);
const quint32 width = std::sqrt(pixels);
const quint32 height = std::ceil(pixels / (qreal)width);
const quint32 bitmapSize = width * height * 4;