Store truncated representation of doubles when used as variables

This commit is contained in:
Przemek Pawlas
2024-02-22 19:47:00 +01:00
committed by WarmUpTill
parent c3f207f93c
commit b2fc560701
3 changed files with 11 additions and 1 deletions

View File

@@ -7,6 +7,7 @@
#include <QDateTime>
#include <QFile>
#include <QStandardPaths>
#include <sstream>
namespace advss {
@@ -77,6 +78,13 @@ bool CompareIgnoringLineEnding(QString &s1, QString &s2)
return true;
}
std::string ToString(double value)
{
std::stringstream stream;
stream << value;
return stream.str();
}
std::string GetDataFilePath(const std::string &file)
{
std::string root_path = obs_get_module_data_path(obs_current_module());