diff --git a/CMakeLists.txt b/CMakeLists.txt index ab064c6..aa72b3c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.21) -set(EFXC2_VERSION 0.0.11.235) +set(EFXC2_VERSION 0.0.11.236) project (efxc2 VERSION ${EFXC2_VERSION} DESCRIPTION "Enhanced fxc2" HOMEPAGE_URL "https://github.com/JPeterMugaas/efxc2" diff --git a/efxc2Console.h b/efxc2Console.h index 2abb1ed..48e3027 100644 --- a/efxc2Console.h +++ b/efxc2Console.h @@ -9,6 +9,8 @@ //-------------------------------------------------------------------------------------- #pragma once +#ifndef EFXC2CONSOLE_H_INCLUDED +#define EFXC2CONSOLE_H_INCLUDED #include "efxc2.h" namespace efxc2Console { @@ -35,7 +37,7 @@ namespace efxc2Console { } #ifdef _WIN32 - void Shutdown() { + void Shutdown() const { (void)SetConsoleMode(std_output, stdout_orig_console_mode); (void)SetConsoleMode(std_error, stderr_orig_console_mode); #else @@ -94,4 +96,5 @@ namespace efxc2Console { } }; const Console console; -} \ No newline at end of file +} +#endif diff --git a/efxc2Exception.h b/efxc2Exception.h index 42c90bf..c1c651e 100644 --- a/efxc2Exception.h +++ b/efxc2Exception.h @@ -9,6 +9,9 @@ //-------------------------------------------------------------------------------------- #pragma once + +#ifndef EFXC2EXCEPTION_H_INCLUDED +#define EFXC2EXCEPTION_H_INCLUDED #include "efxc2.h" namespace efxc2Exception { @@ -27,4 +30,5 @@ namespace efxc2Exception { class NoInputFile : public ProgramExceptionBase {}; class CompileError : public ProgramExceptionBase {}; class PreprocessError : public ProgramExceptionBase {}; -} \ No newline at end of file +} +#endif diff --git a/efxc2Utils.cpp b/efxc2Utils.cpp index e555166..4266fdb 100644 --- a/efxc2Utils.cpp +++ b/efxc2Utils.cpp @@ -180,7 +180,6 @@ bool efxc2Utils::readAll(_In_ std::ifstream& in, _Out_ efxc2Utils::M_BUFFER& dataptr) { dataptr = std::make_shared>(); auto temp = std::make_unique>(); - size_t used = 0; size_t n = 0; bool result = false; if (dataptr != nullptr) { @@ -191,7 +190,6 @@ bool efxc2Utils::readAll(_In_ std::ifstream& in, if (n == 0) { break; } - used += n; temp->resize(n); (void)dataptr->insert(dataptr->end(), temp->begin(), temp->end()); }