aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-17 20:36:11 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-17 20:36:11 +0100
commit50bf1a39668075f206b247cc091a1c542f49a01e (patch)
treed37345262f7bd119b7dacceb55b23ca7c4a584fc
parent917103511c6dcb9aa258cc4dc1aeff9e27593d19 (diff)
parent81404db80bbf9463c3d535ae389e7fbb753a902c (diff)
Merge branch 'master' of https://github.com/lonkaars/crepe into wouter/button-improvement
-rw-r--r--.gitmodules4
-rw-r--r--contributing.md26
m---------lib/fontconfig0
-rw-r--r--readme.md2
4 files changed, 31 insertions, 1 deletions
diff --git a/.gitmodules b/.gitmodules
index bd6e7f7..8155600 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -26,3 +26,7 @@
path = lib/whereami/lib
url = https://github.com/gpakosz/whereami
shallow = true
+[submodule "lib/fontconfig"]
+ path = lib/fontconfig
+ url = https://gitlab.freedesktop.org/fontconfig/fontconfig.git
+ shallow = true
diff --git a/contributing.md b/contributing.md
index 0faed2b..5555892 100644
--- a/contributing.md
+++ b/contributing.md
@@ -827,6 +827,32 @@ that you can click on to open them.
int bar = foo[0];
```
</td></tr></table></details>
+- <details><summary>
+ Always explicitly check against <code>NULL</code> (for C APIs) or
+ <code>nullptr</code> (for C++ APIs) when checking if a pointer is valid
+ </summary><table><tr><th>Good</th><th>Bad</th></tr><tr><td>
+
+ ```cpp
+ string foo = "Hello world";
+ if (foo.c_str() == nullptr)
+ // ...
+
+ void * bar = malloc();
+ if (bar == NULL)
+ // ...
+ ```
+ </td><td>
+
+ ```cpp
+ string foo = "Hello world";
+ if (!foo.c_str())
+ // ...
+
+ void * bar = malloc();
+ if (!bar)
+ // ...
+ ```
+ </td></tr></table></details>
## CMakeLists-specific
diff --git a/lib/fontconfig b/lib/fontconfig
new file mode 160000
+Subproject 72b9a48f57de6204d99ce1c217b5609ee92ece9
diff --git a/readme.md b/readme.md
index 984a368..373c682 100644
--- a/readme.md
+++ b/readme.md
@@ -33,6 +33,7 @@ This project uses the following libraries
|Google Test (`GTest`)|1.15.2|
|Berkeley DB (`libdb`)|5.3.21|
|Where Am I?|(latest git `master` version)
+|fontconfig|2.15.0|
> [!NOTE]
> Most of these libraries are likely available from your package manager if you
@@ -60,7 +61,6 @@ Then, follow these steps for each library you want to install:
$ cd lib/googletest
$ cd lib/sdl2
$ cd lib/soloud/contrib
- $ cd lib/sdl_ttf
$ cd lib/sdl_image
$ cd lib/sdl_ttf
$ cd lib/whereami