summaryrefslogtreecommitdiff
path: root/lyt/binaryfile.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2010-10-14 20:17:20 +0200
committerTreeki <treeki@gmail.com>2010-10-14 20:17:20 +0200
commitebcc95da4c26369511caa90d89c5ed06e1e4853a (patch)
tree6ed445f0204a6e6615088d135c4b29c4309077a4 /lyt/binaryfile.cpp
parentfdf8cfec2b795393d7ee901abaf747575067068b (diff)
downloadLayoutStudio-ebcc95da4c26369511caa90d89c5ed06e1e4853a.tar.gz
LayoutStudio-ebcc95da4c26369511caa90d89c5ed06e1e4853a.zip
brlyt packing added, plus some changes in the existing API (mostly for const correctness). brlyt writing may still need some testing (especially for the material structs)
Diffstat (limited to 'lyt/binaryfile.cpp')
-rw-r--r--lyt/binaryfile.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lyt/binaryfile.cpp b/lyt/binaryfile.cpp
index 2b285c2..26ca8a0 100644
--- a/lyt/binaryfile.cpp
+++ b/lyt/binaryfile.cpp
@@ -20,13 +20,11 @@
#include <QtCore/QDataStream>
-LYTBinaryFile::LYTBinaryFile(Magic magic, Version version) {
- this->magic.value = magic.value;
- this->version.value = version.value;
+LYTBinaryFile::LYTBinaryFile(Magic m, Version v) : magic(m), version(v) {
}
-LYTBinaryFile::LYTBinaryFile(QByteArray data) {
+LYTBinaryFile::LYTBinaryFile(QByteArray data) : magic(0), version(0) {
QDataStream reader(data);
InitDataStream(reader);
@@ -49,7 +47,7 @@ LYTBinaryFile::LYTBinaryFile(QByteArray data) {
}
-QByteArray LYTBinaryFile::pack() {
+QByteArray LYTBinaryFile::pack() const {
// first off, calculate filesize for the header
quint32 fileSize = 16;