From 1275c476766f1612599362629e8fdc1ae2d9cf1c Mon Sep 17 00:00:00 2001 From: dm1sh Date: Wed, 15 Dec 2021 22:44:05 +0300 Subject: [PATCH] Fixed typing errors(Visual Studio type checker sucks) --- Demo/main.cpp | 3 +++ QRCodeLibrary/Encoder.hpp | 4 ++-- QRCodeLibrary/Method.cpp | 2 ++ QRCodeLibrary/{method.hpp => Method.hpp} | 0 4 files changed, 7 insertions(+), 2 deletions(-) rename QRCodeLibrary/{method.hpp => Method.hpp} (100%) diff --git a/Demo/main.cpp b/Demo/main.cpp index 00a8ad8..f0322ad 100644 --- a/Demo/main.cpp +++ b/Demo/main.cpp @@ -1,6 +1,9 @@ #include #include + +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) #include +#endif #include "../QRCodeLibrary/QRCode.hpp" diff --git a/QRCodeLibrary/Encoder.hpp b/QRCodeLibrary/Encoder.hpp index 44c59c2..7ebda8a 100644 --- a/QRCodeLibrary/Encoder.hpp +++ b/QRCodeLibrary/Encoder.hpp @@ -56,9 +56,9 @@ private: BitArray e; }; -template +template constexpr unsigned upper_index(const array arr, T val) { - unsigned count = arr.size(), s = 0, e, step; + unsigned count = arr.size(), s = 0, e = 0, step = 0; while (count > 0) { step = count / 2; diff --git a/QRCodeLibrary/Method.cpp b/QRCodeLibrary/Method.cpp index 14fbc96..42ece72 100644 --- a/QRCodeLibrary/Method.cpp +++ b/QRCodeLibrary/Method.cpp @@ -1,5 +1,7 @@ #include "pch.h" +#include + #include "Method.hpp" #include "Tables.hpp" diff --git a/QRCodeLibrary/method.hpp b/QRCodeLibrary/Method.hpp similarity index 100% rename from QRCodeLibrary/method.hpp rename to QRCodeLibrary/Method.hpp