Merge branch 'master' of https://github.com/huderlem/porymap
This commit is contained in:
commit
0c761edb88
2 changed files with 3 additions and 1 deletions
|
@ -1856,6 +1856,7 @@ QString Project::readCIncbin(QString text, QString label) {
|
|||
|
||||
QMap<QString, int> Project::readCDefines(QString text, QStringList prefixes) {
|
||||
ParseUtil parser;
|
||||
text.replace(QRegularExpression("//.*"), "");
|
||||
QMap<QString, int> allDefines;
|
||||
QMap<QString, int> filteredDefines;
|
||||
QRegularExpression re("#define\\s+(?<defineName>\\w+)[^\\S\\n]+(?<defineValue>.+)");
|
||||
|
@ -1864,7 +1865,7 @@ QMap<QString, int> Project::readCDefines(QString text, QStringList prefixes) {
|
|||
QRegularExpressionMatch match = iter.next();
|
||||
QString name = match.captured("defineName");
|
||||
QString expression = match.captured("defineValue");
|
||||
expression.replace(QRegularExpression("//.*"), "");
|
||||
if (expression == " ") continue;
|
||||
int value = parser.evaluateDefine(expression, &allDefines);
|
||||
allDefines.insert(name, value);
|
||||
for (QString prefix : prefixes) {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "connectionpixmapitem.h"
|
||||
#include <cmath>
|
||||
|
||||
void ConnectionPixmapItem::render(qreal opacity) {
|
||||
QPixmap newPixmap = this->basePixmap.copy(0, 0, this->basePixmap.width(), this->basePixmap.height());
|
||||
|
|
Loading…
Reference in a new issue