mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-28 19:17:28 +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:
@@ -3,8 +3,10 @@
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include "utilities/Globals_macros.h"
|
||||
import eu07.utilities.globals;
|
||||
import eu07.utilities.logs;
|
||||
#include <fstream>
|
||||
#include <ios>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include "config.h"
|
||||
#include "nvrenderer/nvrenderer.h"
|
||||
|
||||
@@ -14,12 +16,10 @@ import eu07.utilities.logs;
|
||||
#include <nvrhi/validation.h>
|
||||
|
||||
#include "nvrendererbackend.h"
|
||||
#include <fstream>
|
||||
#include <ios>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#define HR_RETURN(op) \
|
||||
import eu07.utilities.globals;
|
||||
import eu07.utilities.logs;
|
||||
hr = (HRESULT)(op); \
|
||||
if (FAILED(hr)) { \
|
||||
ErrorLog(fmt::format(#op " returned HRESULT={}", hr)); \
|
||||
|
||||
Reference in New Issue
Block a user