aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-17 20:43:36 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-17 20:43:36 +0100
commit970159235e5f1a1dcb6a7f725e782374ced54d3b (patch)
treedb3150d405b73513b6c2a005d7dfde7acadd2cf8
parent23eef97ed3fc57fdd619769a74d0abfa7f657714 (diff)
parent81404db80bbf9463c3d535ae389e7fbb753a902c (diff)
Merge branch 'master' into niels/UI
-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