cppcheck is useless

This commit is contained in:
Ben Kyd
2022-12-06 00:33:02 +00:00
parent 256032f46b
commit 0e55d09905
9 changed files with 63 additions and 40 deletions

View File

@@ -70,7 +70,8 @@
"valarray": "cpp", "valarray": "cpp",
"variant": "cpp", "variant": "cpp",
"complex": "cpp", "complex": "cpp",
"hash_map": "cpp" "hash_map": "cpp",
"filesystem": "cpp"
}, },
"cmake.configureOnOpen": false "cmake.configureOnOpen": false
} }

View File

@@ -18,3 +18,9 @@ extern "C"
// glm // glm
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtc/type_ptr.hpp> #include <glm/gtc/type_ptr.hpp>
#include <vector>
namespace inferno {
class Ray;
using RayField = std::vector<Ray*>;
}

View File

@@ -1,5 +1,7 @@
#include "hart_directory.hpp" #include "hart_directory.hpp"
#include "inferno_hart.hpp"
#include <spdlog/spdlog.h> #include <spdlog/spdlog.h>
#include <iostream> #include <iostream>

View File

@@ -6,13 +6,31 @@
// _CREDIT returns ModuleCredit // _CREDIT returns ModuleCredit
#include <filesystem> #include <filesystem>
#include <string>
#include <vector> #include <vector>
#include <unordered_map> #include <unordered_map>
#include "inferno_hart.hpp"
namespace inferno { namespace inferno {
class HARTModule;
struct ModuleCredit;
#ifdef _WIN32
#include <Windows.h>
#define HART_EXTENSION ".dll"
#define HART_INTERFACE extern "C" __declspec(dllexport)
#else // UNIX-Like
#include <dlfcn.h>
#define HART_EXTENSION ".so"
#define HART_INTERFACE extern "C"
#endif
HART_INTERFACE typedef void* (*HART_INIT_F)(void);
HART_INTERFACE typedef void (*HART_DESTROY_F)(void*);
HART_INTERFACE typedef void* (*HART_CREDIT_F)(void);
typedef void (*HART_HIT_CALLBACK)(HitInfo* hit);
class HARTModuleDirectory class HARTModuleDirectory
{ {
public: public:

View File

@@ -5,6 +5,7 @@
#include <vector> #include <vector>
#include <graphics.hpp>
#include "hart_directory.hpp" #include "hart_directory.hpp"
namespace inferno { namespace inferno {
@@ -14,8 +15,6 @@ class Ray;
class HitInfo; class HitInfo;
class HARTModule; class HARTModule;
using RayField = std::vector<Ray*>;
class HHM class HHM
{ {
public: public:

View File

@@ -1,45 +1,43 @@
#include "dispatcher.hpp" // #include "dispatcher.hpp"
#include <graphics.hpp> // #include "hart_module.hpp"
// #include "renderer.hpp"
#include "renderer.hpp"
#include "hart_module.hpp" // using namespace inferno;
using namespace inferno; // RenderDispatcher::RenderDispatcher()
// {
// // mHHM = new HHM();
// // mRenderer = new RayRenderer(mHHM);
// }
RenderDispatcher::RenderDispatcher() // RenderDispatcher::~RenderDispatcher()
{ // {
mHHM = new HHM();
mRenderer = new RayRenderer(mHHM);
}
RenderDispatcher::~RenderDispatcher() // }
{
} // RayRenderer* RenderDispatcher::getRenderer()
// {
// return mRenderer;
// }
RayRenderer* RenderDispatcher::getRenderer() // HHM* RenderDispatcher::getTopModule()
{ // {
return mRenderer; // return mHHM;
} // }
HHM* RenderDispatcher::getTopModule() // void RenderDispatcher::startProgression()
{ // {
return mHHM;
}
void RenderDispatcher::startProgression() // }
{
} // void RenderDispatcher::stopProgression()
// {
void RenderDispatcher::stopProgression() // }
{
} // GLuint RenderDispatcher::getLatestTexture()
// {
GLuint RenderDispatcher::getLatestTexture() // }
{
}

View File

@@ -46,7 +46,7 @@ RayField RaySource::getInitialRays(bool MSAA)
for (int x = 0; x < mReferenceCamera->getRayViewport().x; x++) for (int x = 0; x < mReferenceCamera->getRayViewport().x; x++)
for (int y = 0; y < mReferenceCamera->getRayViewport().y; y++) for (int y = 0; y < mReferenceCamera->getRayViewport().y; y++)
{ {
float Px = (2.0f * ((x + 0.5f) / mReferenceCamera->getRayViewport().x) - 1.0f) * scale * aspect; float Px = (2.0f * ((x + 0.5f) / mReferenceCamera->getRayViewport().x) - 1.0f) * scale * aspect;
float Py = (1.0f - 2.0f * ((y + 0.5f) / mReferenceCamera->getRayViewport().y) * scale); float Py = (1.0f - 2.0f * ((y + 0.5f) / mReferenceCamera->getRayViewport().y) * scale);
Ray* ray = new Ray; Ray* ray = new Ray;
@@ -57,4 +57,4 @@ RayField RaySource::getInitialRays(bool MSAA)
} }
return field; return field;
} }

View File

@@ -8,8 +8,6 @@
namespace inferno { namespace inferno {
using RayField = std::vector<Ray*>;
class Camera; class Camera;
class RaySource class RaySource

1
suppressions.txt Normal file
View File

@@ -0,0 +1 @@
*:*/thirdparty/*