summaryrefslogtreecommitdiff
path: root/scripts/build-shaders.py
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-05-25 21:14:18 +0200
committerKonstantin Käfer <mail@kkaefer.com>2016-05-25 21:35:37 +0200
commite2bcea90fce8a1e05e517c615d21d845e955f53d (patch)
tree208da7ad0db235a13b5ae6d360279a624e46fb95 /scripts/build-shaders.py
parent6368403f433cfbfed1547d4167a9836fa2942a97 (diff)
downloadqtlocation-mapboxgl-e2bcea90fce8a1e05e517c615d21d845e955f53d.tar.gz
[core] use #pragma once instead of ifdef include guards
Diffstat (limited to 'scripts/build-shaders.py')
-rwxr-xr-xscripts/build-shaders.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/scripts/build-shaders.py b/scripts/build-shaders.py
index 4cfb3cb384..228ba65112 100755
--- a/scripts/build-shaders.py
+++ b/scripts/build-shaders.py
@@ -18,10 +18,9 @@ shader_name, shader_type, extension = os.path.basename(input_file).split('.')
with open(input_file, "r") as f:
data = f.read()
-content = """// NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED.
+content = """#pragma once
-#ifndef MBGL_SHADER_{NAME}_{TYPE}
-#define MBGL_SHADER_{NAME}_{TYPE}
+// NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED.
#include <mbgl/gl/gl.hpp>
@@ -38,8 +37,6 @@ constexpr const char* {type} = R"MBGL_SHADER(#version 120\n{data})MBGL_SHADER";
}} // namespace {name}
}} // namespace shaders
}} // namespace mbgl
-
-#endif
""".format(
name = shader_name,
NAME = shader_name.upper(),