summaryrefslogtreecommitdiff
path: root/prelude/slang-cpp-prelude.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2020-09-24 14:30:12 -0700
committerGitHub <noreply@github.com>2020-09-24 14:30:12 -0700
commitb72353ec3fe529237828cacbe710233d31eb4837 (patch)
tree2aec9af97efe52b722cb730f8db1c44641e58c62 /prelude/slang-cpp-prelude.h
parent150218bec9e992d32833dd9a0c1396a4d7c12b7e (diff)
Enable default cpp prelude. (#1560)
* Enable default cpp prelude. * Print the "#include" line as a normal source if the file does not exist. * Bug fix * Fix. * Fix c++ prelude header. * Remove unnecessary fopen call.
Diffstat (limited to 'prelude/slang-cpp-prelude.h')
-rw-r--r--prelude/slang-cpp-prelude.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/prelude/slang-cpp-prelude.h b/prelude/slang-cpp-prelude.h
index b00f34d8f..23619d102 100644
--- a/prelude/slang-cpp-prelude.h
+++ b/prelude/slang-cpp-prelude.h
@@ -1,8 +1,6 @@
#ifndef SLANG_CPP_PRELUDE_H
#define SLANG_CPP_PRELUDE_H
-#include "../slang.h"
-
// Because the signiture of isnan, isfinite, and is isinf changed in C++, we use the macro
// to use the version in the std namespace.
// https://stackoverflow.com/questions/39130040/cmath-hides-isnan-in-math-h-in-c14-c11
@@ -42,7 +40,7 @@
#include "slang-cpp-scalar-intrinsics.h"
// TODO(JS): Hack! Output C++ code from slang can copy uninitialized variables.
-#if SLANG_VC
+#if defined(_MSC_VER)
# pragma warning(disable : 4700)
#endif
@@ -66,4 +64,4 @@ gfx_PipelineState_0* buildPipelineState_0(gfx_ShaderProgram_0* _0, gfx_Renderer_
void dispatchComputation_0(gfx_Renderer_0* _0, gfx_PipelineState_0* _1, gfx_PipelineLayout_0* _2, gfx_DescriptorSet_0* _3, uint32_t _4, uint32_t _5, uint32_t _6);
gfx_BufferResource_0* unconvertBuffer_0(RWStructuredBuffer<float> _0);
-#endif \ No newline at end of file
+#endif