17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-30 17:50:29 +01:00

put every include before every import

A header first pulled in through an imported module's global module
fragment leaves no include guard in the importing unit - macros do not
cross a module boundary - so a later textual include parses it again and
MSVC rejects the redefinition. Redoes the betterRenderer sweep with
placement that stays out of #if blocks, which is where the previous one
dropped <fstream> and broke nvrenderer_d3d12.cpp.
This commit is contained in:
maj00r
2026-09-10 00:40:32 +02:00
parent 2695c8e525
commit 1455583ab6
36 changed files with 122 additions and 129 deletions

View File

@@ -24,20 +24,6 @@
// EU07 includes. This header is consumed by translation units that include
// nothing else, so everything it names has to be imported here rather than
// relied on to arrive from the including file.
import eu07.utilities.classes;
import eu07.utilities.globals;
import eu07.simcore;
import eu07.rendering.geometrybank;
import eu07.global_include.interfaces.imaterial;
import eu07.global_include.interfaces.itexture;
import eu07.gl.shader;
#include "nvrenderer_enums.h"
#include "quadtree.h"
import eu07.rendering.renderer;
#include "resource_registry.h"
import eu07.environment.sky;
import eu07.glm;
#include <array>
#include <condition_variable>
#include <cstddef>
@@ -50,6 +36,20 @@ import eu07.glm;
#include <utility>
#include <vector>
#include "nvrenderer_enums.h"
#include "quadtree.h"
#include "resource_registry.h"
import eu07.utilities.classes;
import eu07.utilities.globals;
import eu07.simcore;
import eu07.rendering.geometrybank;
import eu07.global_include.interfaces.imaterial;
import eu07.global_include.interfaces.itexture;
import eu07.gl.shader;
import eu07.rendering.renderer;
import eu07.environment.sky;
import eu07.glm;
namespace Rt {
struct IRtModel;
}

View File

@@ -3,11 +3,11 @@
#include <array>
#include <memory>
#include <vector>
import eu07.glm;
#include <cstdint>
#include <cstddef>
#include <limits>
#include <cstdint>
import eu07.glm;
struct QuadTreeLeave {
QuadTreeLeave(const glm::dvec3& origin, const glm::dvec3& extent,
uint32_t index)

View File

@@ -3,11 +3,11 @@
#include <nvrhi/nvrhi.h>
#include <entt/entt.hpp>
import eu07.glm;
#include <cstddef>
#include <cstdint>
#include <memory>
import eu07.glm;
class NvTextureManager;
class MaResourceRegistry;