diff options
| -rw-r--r-- | .gitmodules | 4 | ||||
| -rw-r--r-- | contributing.md | 26 | ||||
| m--------- | lib/fontconfig | 0 | ||||
| -rw-r--r-- | readme.md | 2 | 
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 @@ -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 |