From 9607bfab830039c8db0fc76868ff584873982738 Mon Sep 17 00:00:00 2001 From: Stephen G Date: Thu, 18 Apr 2024 11:40:24 -0700 Subject: [PATCH] 3 C++ source files: fix some errors, bugs --- engine/src/audio/Exceptions.h | 14 ++++++-------- engine/src/gfx/mesh_gfx.cpp | 1 + engine/src/vs_logging.h | 20 ++++++++++---------- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/engine/src/audio/Exceptions.h b/engine/src/audio/Exceptions.h index 60e627ee24..7350925261 100644 --- a/engine/src/audio/Exceptions.h +++ b/engine/src/audio/Exceptions.h @@ -1,10 +1,8 @@ -/** +/* * Exceptions.h * - * Copyright (C) Daniel Horn - * Copyright (C) 2020 pyramid3d, Stephen G. Tuggy, and other Vega Strike - * contributors - * Copyright (C) 2022-2023 Stephen G. Tuggy, Benjamen R. Meyer + * Copyright (C) 2001-2024 Daniel Horn, pyramid3d, Stephen G. Tuggy, + * Benjamen R. Meyer, and other Vega Strike contributors * * https://github.com/vegastrike/Vega-Strike-Engine-Source * @@ -17,11 +15,11 @@ * * Vega Strike is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Vega Strike. If not, see . + * along with Vega Strike. If not, see . */ #ifndef VEGA_STRIKE_ENGINE_AUDIO_EXCEPTIONS_H #define VEGA_STRIKE_ENGINE_AUDIO_EXCEPTIONS_H @@ -140,7 +138,7 @@ class EndOfStreamException : public Exception { class CorruptStreamException : public Exception { bool fatal; public: - CorruptStreamException(const CorruptStreamException &other) : Exception(other) { + CorruptStreamException(const CorruptStreamException &other) : Exception(other), fatal(true) { } explicit CorruptStreamException(bool _fatal) diff --git a/engine/src/gfx/mesh_gfx.cpp b/engine/src/gfx/mesh_gfx.cpp index 91f2d7c4b1..7e784982ab 100644 --- a/engine/src/gfx/mesh_gfx.cpp +++ b/engine/src/gfx/mesh_gfx.cpp @@ -458,6 +458,7 @@ Mesh::~Mesh() { resetIter = true; cachedHashItem = hashItem + 1; } + //delete hashItem; hashers->erase(hashItem); if (hashers->empty()) { bfxmHashTable.Delete(hash_name); diff --git a/engine/src/vs_logging.h b/engine/src/vs_logging.h index d37bf2c971..f61fc00c04 100644 --- a/engine/src/vs_logging.h +++ b/engine/src/vs_logging.h @@ -24,16 +24,16 @@ #include -#include -#include -#include -//#include -#include -#include -#include -#include -#include -#include +#include "boost/move/utility_core.hpp" +#include "boost/smart_ptr/shared_ptr.hpp" +#include "boost/format.hpp" +//#include "boost/log/sources/logger.hpp" +#include "boost/log/sources/severity_logger.hpp" +#include "boost/log/sources/record_ostream.hpp" +#include "boost/log/sinks/sync_frontend.hpp" +#include "boost/log/sinks/text_file_backend.hpp" +#include "boost/log/sinks/text_ostream_backend.hpp" +#include "boost/filesystem.hpp" namespace VegaStrikeLogging {