Ivan Arkhipov hace 5 años
padre
commit
d9e7e555c3

+ 4 - 1
CHANGELOG

@@ -72,4 +72,7 @@ Version 7.2.0
     * Reimplemented categories support
 ----------------------------------------------------------------------
 Version 7.2.1
-    * Bug fixes (Text files used incorrect fragments during import, if there was no fragment in patch with specified id)
+    * Bug fixes (Text files used incorrect fragments during import, if there was no fragment in patch with specified id)
+----------------------------------------------------------------------
+Version 7.2.2
+    * Small fixes, added one more protection layer: locales dictionary now contains hash of header at the moment of last patch applying. So that system can easily detect if file was modified and there's a need to update patches.

+ 1 - 1
CMakeLists.txt

@@ -3,7 +3,7 @@ project(LotroDat)
 
 set(CMAKE_CXX_STANDARD 14)
 set(PROJECT_BINARY_DIR bin)
-set(PROJECT_VERSION 7.2.1)
+set(PROJECT_VERSION 7.2.2)
 
 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS} -Wall -Wextra -O2")
 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}")

+ 1 - 1
include/LotroDat.h

@@ -2,7 +2,7 @@
 // Created by Иван_Архипов on 01.11.2017.
 //
 
-#define LOTRO_DAT_VERSION "7.2.1"
+#define LOTRO_DAT_VERSION "7.2.2"
 
 #include "DatFile.h"
 #include "Database.h"

+ 1 - 1
include/Subfiles/DdsSubFile.h

@@ -14,7 +14,7 @@ namespace LOTRO_DAT {
         explicit DdsSubFile(const DdsSubFile &other) = delete;
         DdsSubFile &operator =(const DdsSubFile &other) = delete;
 
-        DdsSubFile(SubFile preinit_file);
+        explicit DdsSubFile(SubFile preinit_file);
 
         FILE_TYPE FileType() const override;
 

+ 1 - 1
include/Subfiles/FontSubFile.h

@@ -15,7 +15,7 @@ namespace LOTRO_DAT {
         explicit FontSubFile(const FontSubFile &other) = delete;
         FontSubFile &operator =(const FontSubFile &other) = delete;
 
-        FontSubFile(SubFile preinit_file);
+        explicit FontSubFile(SubFile preinit_file);
 
         FILE_TYPE FileType() const override;
 

+ 1 - 1
include/Subfiles/JpgSubFile.h

@@ -15,7 +15,7 @@ namespace LOTRO_DAT {
         explicit JpgSubFile(const JpgSubFile &other) = delete;
         JpgSubFile &operator =(const JpgSubFile &other) = delete;
 
-        JpgSubFile(SubFile preinit_file);
+        explicit JpgSubFile(SubFile preinit_file);
 
 
         FILE_TYPE FileType() const override;

+ 1 - 1
include/Subfiles/OggSubFile.h

@@ -14,7 +14,7 @@ namespace LOTRO_DAT {
         explicit OggSubFile(const OggSubFile &other) = delete;
         OggSubFile &operator =(const OggSubFile &other) = delete;
 
-        OggSubFile(SubFile preinit_file);
+        explicit OggSubFile(SubFile preinit_file);
 
         FILE_TYPE FileType() const override;
         std::string Extension() const override;

+ 1 - 1
include/Subfiles/UnknownSubFile.h

@@ -14,7 +14,7 @@ namespace LOTRO_DAT {
         explicit UnknownSubFile(const UnknownSubFile &other) = delete;
         SubFile &operator =(const UnknownSubFile &other) = delete;
 
-        UnknownSubFile(SubFile preinit_file);
+        explicit UnknownSubFile(SubFile preinit_file);
 
         FILE_TYPE FileType() const override;
         std::string Extension() const override;

+ 1 - 1
include/Subfiles/WavSubFile.h

@@ -14,7 +14,7 @@ namespace LOTRO_DAT {
         explicit WavSubFile(const WavSubFile &other) = delete;
         WavSubFile &operator =(const WavSubFile &other) = delete;
 
-        WavSubFile(SubFile preinit_file);
+        explicit WavSubFile(SubFile preinit_file);
 
 
         FILE_TYPE FileType() const override;

+ 2 - 2
src/BinaryData.cpp

@@ -68,7 +68,7 @@ namespace LOTRO_DAT {
     // Translates T bytes from data into number using UTF-16LE encoding of the .dat file
     template<unsigned int T>
     long long BinaryData::ToNumber(const long long &pos) const {
-        long long ans = 0;
+        unsigned long long ans = 0;
 
         if (pos + T > size_) {
             LOG(ERROR) << "Reading " << T << " bytes from " << pos << " offset with BinaryData size " << size_
@@ -77,7 +77,7 @@ namespace LOTRO_DAT {
         }
 
         for (int i = T - 1; i >= 0; i--)
-            ans = ((ans << 8ll) | data_[pos + i]);
+            ans = ((ans << 8ull) | data_[pos + i]);
 
         return ans;
     }