Tue, 14 Feb 2017 09:48:51 +0200
Removed the intXX type aliases and removed uses of intXX_t in favor of qintXX
src/basics.h | file | annotate | diff | comparison | revisions | |
src/glRenderer.cpp | file | annotate | diff | comparison | revisions | |
src/ldDocument.cpp | file | annotate | diff | comparison | revisions | |
src/ldDocument.h | file | annotate | diff | comparison | revisions | |
src/ldObject.cpp | file | annotate | diff | comparison | revisions | |
src/ldObject.h | file | annotate | diff | comparison | revisions | |
src/mainwindow.cpp | file | annotate | diff | comparison | revisions | |
src/model.cpp | file | annotate | diff | comparison | revisions | |
src/partdownloadrequest.cpp | file | annotate | diff | comparison | revisions |
--- a/src/basics.h Tue Feb 14 08:33:44 2017 +0200 +++ b/src/basics.h Tue Feb 14 09:48:51 2017 +0200 @@ -35,15 +35,6 @@ class QTextStream; class Matrix; class LDDocument; - -using int8 = qint8; -using int16 = qint16; -using int32 = qint32; -using int64 = qint64; -using uint8 = quint8; -using uint16 = quint16; -using uint32 = quint32; -using uint64 = quint64; using LDObjectList = QList<LDObject*>; template<typename T, typename R>
--- a/src/glRenderer.cpp Tue Feb 14 08:33:44 2017 +0200 +++ b/src/glRenderer.cpp Tue Feb 14 09:48:51 2017 +0200 @@ -713,22 +713,20 @@ // Read pixels from the color buffer. glReadPixels(x0, height() - y1, areawidth, areaheight, GL_RGBA, GL_UNSIGNED_BYTE, pixelData.data()); - QSet<int32_t> indices; + QSet<qint32> indices; // Go through each pixel read and add them to the selection. // Each pixel maps to an LDObject index injectively. // Note: black is background, those indices are skipped. for (unsigned char *pixelCursor = pixelData.begin(); pixelCursor < pixelData.end(); pixelCursor += 4) { - int32_t index = pixelCursor[0] * 0x10000 + - pixelCursor[1] * 0x100 + - pixelCursor[2] * 0x1; + qint32 index = pixelCursor[0] * 0x10000 + pixelCursor[1] * 0x100 + pixelCursor[2] * 0x1; if (index != 0) indices.insert(index); } // For each index read, resolve the LDObject behind it and add it to the selection. - for (int32_t index : indices) + for (qint32 index : indices) { LDObject* object = LDObject::fromID(index);
--- a/src/ldDocument.cpp Tue Feb 14 08:33:44 2017 +0200 +++ b/src/ldDocument.cpp Tue Feb 14 09:48:51 2017 +0200 @@ -205,7 +205,7 @@ // ============================================================================= // -bool LDDocument::save (QString path, int64* sizeptr) +bool LDDocument::save (QString path, qint64* sizeptr) { if (isFrozen()) return false;
--- a/src/ldDocument.h Tue Feb 14 08:33:44 2017 +0200 +++ b/src/ldDocument.h Tue Feb 14 09:48:51 2017 +0200 @@ -72,7 +72,7 @@ void redoVertices(); void reloadAllSubfiles(); void removeFromSelection (LDObject* obj); - bool save (QString path = "", int64* sizeptr = nullptr); + bool save (QString path = "", qint64* sizeptr = nullptr); long savePosition() const; void setDefaultName (QString value); void setFrozen(bool value);
--- a/src/ldObject.cpp Tue Feb 14 08:33:44 2017 +0200 +++ b/src/ldObject.cpp Tue Feb 14 09:48:51 2017 +0200 @@ -28,7 +28,7 @@ #include "glCompiler.h" // List of all LDObjects -QMap<int32, LDObject*> g_allObjects; +QMap<qint32, LDObject*> g_allObjects; enum { MAX_LDOBJECT_IDS = (1 << 24) }; @@ -48,7 +48,7 @@ assert(_model != nullptr); // Let's hope that nobody goes to create 17 million objects anytime soon... - static int32 nextId = 1; // 0 shalt be null + static qint32 nextId = 1; // 0 shalt be null if (nextId < MAX_LDOBJECT_IDS) m_id = nextId++; else @@ -626,7 +626,7 @@ // ============================================================================= // -LDObject* LDObject::fromID(int32 id) +LDObject* LDObject::fromID(qint32 id) { return g_allObjects.value(id); }
--- a/src/ldObject.h Tue Feb 14 08:33:44 2017 +0200 +++ b/src/ldObject.h Tue Feb 14 09:48:51 2017 +0200 @@ -124,7 +124,7 @@ virtual QString typeName() const = 0; const Vertex& vertex (int i) const; - static LDObject* fromID(int32 id); + static LDObject* fromID(qint32 id); signals: void codeChanged(QString before, QString after);
--- a/src/mainwindow.cpp Tue Feb 14 08:33:44 2017 +0200 +++ b/src/mainwindow.cpp Tue Feb 14 09:48:51 2017 +0200 @@ -720,7 +720,7 @@ return false; QString path = doc->fullPath(); - int64 savesize; + qint64 savesize; if (saveAs or path.isEmpty()) {
--- a/src/model.cpp Tue Feb 14 08:33:44 2017 +0200 +++ b/src/model.cpp Tue Feb 14 09:48:51 2017 +0200 @@ -323,7 +323,7 @@ return v; } -static int32 StringToNumber (QString a, bool* ok = nullptr) +static qint32 StringToNumber (QString a, bool* ok = nullptr) { int base = 10;
--- a/src/partdownloadrequest.cpp Tue Feb 14 08:33:44 2017 +0200 +++ b/src/partdownloadrequest.cpp Tue Feb 14 09:48:51 2017 +0200 @@ -240,7 +240,7 @@ prompt()->checkIfFinished(); } -void PartDownloadRequest::updateDownloadProgress (int64 recv, int64 total) +void PartDownloadRequest::updateDownloadProgress (qint64 recv, qint64 total) { m_numBytesRead = recv; m_numBytesTotal = total;