summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/cache.h5
-rw-r--r--lib/chronology.hpp5
-rw-r--r--lib/collection.hpp5
-rw-r--r--lib/embed-glsl.h.m42
-rw-r--r--lib/glRef.hpp5
-rw-r--r--lib/jsonParse-persistence.h5
-rw-r--r--lib/jsonParse.h5
-rw-r--r--lib/location.hpp5
-rw-r--r--lib/maths.h5
-rw-r--r--lib/persistence.h5
-rw-r--r--lib/ptr.hpp5
-rw-r--r--lib/resource.h5
-rw-r--r--lib/sorting.hpp5
-rw-r--r--lib/special_members.hpp5
-rw-r--r--lib/stream_support.hpp5
-rw-r--r--lib/strings.hpp7
-rw-r--r--lib/unicode.h5
-rw-r--r--lib/work.h5
-rw-r--r--lib/worker.h4
19 files changed, 22 insertions, 71 deletions
diff --git a/lib/cache.h b/lib/cache.h
index cdc0a2e..5ab9469 100644
--- a/lib/cache.h
+++ b/lib/cache.h
@@ -1,5 +1,4 @@
-#ifndef CACHE_H
-#define CACHE_H
+#pragma once
#include "special_members.hpp"
#include <functional>
@@ -37,5 +36,3 @@ private:
std::map<Key, Ptr, std::less<>> cached;
};
// IWYU pragma: no_forward_declare Cache
-
-#endif
diff --git a/lib/chronology.hpp b/lib/chronology.hpp
index 5edf95a..1980116 100644
--- a/lib/chronology.hpp
+++ b/lib/chronology.hpp
@@ -1,8 +1,5 @@
-#ifndef CHRONOLOGY_H
-#define CHRONOLOGY_H
+#pragma once
#include <chrono>
using TickDuration = std::chrono::duration<float, std::chrono::seconds::period>;
-
-#endif
diff --git a/lib/collection.hpp b/lib/collection.hpp
index cf51157..a80faa2 100644
--- a/lib/collection.hpp
+++ b/lib/collection.hpp
@@ -1,5 +1,4 @@
-#ifndef COLLECTION_H
-#define COLLECTION_H
+#pragma once
#include <algorithm>
#include <memory>
@@ -69,5 +68,3 @@ public:
return objects.end();
}
};
-
-#endif
diff --git a/lib/embed-glsl.h.m4 b/lib/embed-glsl.h.m4
index f277c56..57ba0cf 100644
--- a/lib/embed-glsl.h.m4
+++ b/lib/embed-glsl.h.m4
@@ -1,3 +1,5 @@
+#pragma once
+
// NAME
#include <gfx/gl/glSource.h>
diff --git a/lib/glRef.hpp b/lib/glRef.hpp
index 3377390..fc0c1c6 100644
--- a/lib/glRef.hpp
+++ b/lib/glRef.hpp
@@ -1,5 +1,4 @@
-#ifndef GLREF_H
-#define GLREF_H
+#pragma once
#include <special_members.hpp>
#include <stdexcept>
@@ -58,5 +57,3 @@ public:
private:
IdType id;
};
-
-#endif
diff --git a/lib/jsonParse-persistence.h b/lib/jsonParse-persistence.h
index edb5305..fa5e772 100644
--- a/lib/jsonParse-persistence.h
+++ b/lib/jsonParse-persistence.h
@@ -1,5 +1,4 @@
-#ifndef JSONPARSE_PERSISTANCE
-#define JSONPARSE_PERSISTANCE
+#pragma once
#include "jsonParse.h" // IWYU pragma: export
#include "persistence.h" // IWYU pragma: export
@@ -68,5 +67,3 @@ namespace Persistence {
std::ostream & strm;
};
}
-
-#endif
diff --git a/lib/jsonParse.h b/lib/jsonParse.h
index 79833eb..4205572 100644
--- a/lib/jsonParse.h
+++ b/lib/jsonParse.h
@@ -1,5 +1,4 @@
-#ifndef JSONFLEXLEXER_H
-#define JSONFLEXLEXER_H
+#pragma once
#ifndef FLEX_SCANNER
# define yyFlexLexer jsonBaseFlexLexer
@@ -39,5 +38,3 @@ namespace json {
std::string buf;
};
}
-
-#endif
diff --git a/lib/location.hpp b/lib/location.hpp
index b019b7a..1360c47 100644
--- a/lib/location.hpp
+++ b/lib/location.hpp
@@ -1,5 +1,4 @@
-#ifndef LOCATION_H
-#define LOCATION_H
+#pragma once
#include <glm/glm.hpp>
@@ -10,5 +9,3 @@ public:
glm::vec3 pos;
glm::vec3 rot;
};
-
-#endif
diff --git a/lib/maths.h b/lib/maths.h
index c7b1c8f..514a5ad 100644
--- a/lib/maths.h
+++ b/lib/maths.h
@@ -1,5 +1,4 @@
-#ifndef MATH_H
-#define MATH_H
+#pragma once
#include <cmath>
#include <glm/glm.hpp>
@@ -142,5 +141,3 @@ kph_to_ms(T v)
// ... literals are handy for now, probably go away when we load stuff externally
float operator"" _mph(const long double v);
float operator"" _kph(const long double v);
-
-#endif
diff --git a/lib/persistence.h b/lib/persistence.h
index 60b40ca..4fbff4c 100644
--- a/lib/persistence.h
+++ b/lib/persistence.h
@@ -1,5 +1,4 @@
-#ifndef PERSISTANCE_H
-#define PERSISTANCE_H
+#pragma once
#include <functional>
#include <glm/glm.hpp>
@@ -463,5 +462,3 @@ namespace Persistence {
#define STORE_TYPE store.persistType(this, typeid(*this))
#define STORE_MEMBER(mbr) store.persistValue(#mbr, mbr)
-
-#endif
diff --git a/lib/ptr.hpp b/lib/ptr.hpp
index f242670..931df39 100644
--- a/lib/ptr.hpp
+++ b/lib/ptr.hpp
@@ -1,5 +1,4 @@
-#ifndef PTR_H
-#define PTR_H
+#pragma once
#include <memory>
#include <special_members.hpp>
@@ -66,5 +65,3 @@ public:
{
}
};
-
-#endif
diff --git a/lib/resource.h b/lib/resource.h
index 958c49d..37dd657 100644
--- a/lib/resource.h
+++ b/lib/resource.h
@@ -1,5 +1,4 @@
-#ifndef RESOURCE_H
-#define RESOURCE_H
+#pragma once
#include <filesystem>
@@ -19,5 +18,3 @@ public:
};
BOOST_GLOBAL_FIXTURE(SetResourcePath);
#endif
-
-#endif
diff --git a/lib/sorting.hpp b/lib/sorting.hpp
index 0cb0eaf..6b9be6a 100644
--- a/lib/sorting.hpp
+++ b/lib/sorting.hpp
@@ -1,5 +1,4 @@
-#ifndef SORTING_H
-#define SORTING_H
+#pragma once
template<typename T> struct PtrSorter {
bool
@@ -8,5 +7,3 @@ template<typename T> struct PtrSorter {
return *a < *b;
}
};
-
-#endif
diff --git a/lib/special_members.hpp b/lib/special_members.hpp
index 4b85884..312862b 100644
--- a/lib/special_members.hpp
+++ b/lib/special_members.hpp
@@ -1,5 +1,4 @@
-#ifndef SPECIAL_MEMBERS_H
-#define SPECIAL_MEMBERS_H
+#pragma once
#define NO_COPY(TYPE) \
TYPE(const TYPE &) = delete; \
@@ -28,5 +27,3 @@
#define CUSTOM_MOVE(TYPE) \
TYPE(TYPE &&) noexcept; \
TYPE & operator=(TYPE &&) noexcept
-
-#endif
diff --git a/lib/stream_support.hpp b/lib/stream_support.hpp
index 1ee1661..449708c 100644
--- a/lib/stream_support.hpp
+++ b/lib/stream_support.hpp
@@ -1,5 +1,4 @@
-#ifndef STREAM_SUPPORT_H
-#define STREAM_SUPPORT_H
+#pragma once
#include <glm/glm.hpp>
#include <iostream>
@@ -38,5 +37,3 @@ namespace std {
}
#define CLOG(x) std::clog << #x " : " << x << "\n";
-
-#endif
diff --git a/lib/strings.hpp b/lib/strings.hpp
index ee0db95..9dca9ac 100644
--- a/lib/strings.hpp
+++ b/lib/strings.hpp
@@ -1,5 +1,6 @@
-#ifndef STRINGS_HPP
-#define STRINGS_HPP
+#pragma once
+
+#include <GL/glew.h>
constexpr auto
constexpr_strlen(const GLchar * const s)
@@ -10,5 +11,3 @@ constexpr_strlen(const GLchar * const s)
}
return ch;
}
-
-#endif
diff --git a/lib/unicode.h b/lib/unicode.h
index 8bd841b..dde1d3d 100644
--- a/lib/unicode.h
+++ b/lib/unicode.h
@@ -1,5 +1,4 @@
-#ifndef UNICODE_H
-#define UNICODE_H
+#pragma once
// Wrappers of some glib functions (why are we using glib then?) which we want, but glib.h is a bit C like
@@ -16,5 +15,3 @@ uint32_t get_codepoint(const char *);
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/lib/work.h b/lib/work.h
index 2374673..c780e13 100644
--- a/lib/work.h
+++ b/lib/work.h
@@ -1,5 +1,4 @@
-#ifndef WORK_H
-#define WORK_H
+#pragma once
#include <special_members.hpp>
@@ -11,5 +10,3 @@ public:
virtual void doWork() = 0;
};
-
-#endif
diff --git a/lib/worker.h b/lib/worker.h
index 7df16cd..de7d973 100644
--- a/lib/worker.h
+++ b/lib/worker.h
@@ -1,5 +1,4 @@
-#ifndef WORKER_H
-#define WORKER_H
+#pragma once
#include <utility>
class Work;
@@ -57,4 +56,3 @@ public:
};
#endif
-#endif