From 977b63e96c5ad26035b21444e896a892c1847738 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Tue, 17 Dec 2024 20:20:32 +0100 Subject: update libraries --- .gitmodules | 4 ++++ lib/fontconfig | 1 + readme.md | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) create mode 160000 lib/fontconfig 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/lib/fontconfig b/lib/fontconfig new file mode 160000 index 0000000..72b9a48 --- /dev/null +++ b/lib/fontconfig @@ -0,0 +1 @@ +Subproject commit 72b9a48f57de6204d99ce1c217b5609ee92ece9b 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 -- cgit v1.2.3 From 81404db80bbf9463c3d535ae389e7fbb753a902c Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Tue, 17 Dec 2024 20:30:13 +0100 Subject: update contributing.md --- contributing.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) 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]; ``` +-
+ Always explicitly check against NULL (for C APIs) or + nullptr (for C++ APIs) when checking if a pointer is valid +
GoodBad
+ + ```cpp + string foo = "Hello world"; + if (foo.c_str() == nullptr) + // ... + + void * bar = malloc(); + if (bar == NULL) + // ... + ``` + + + ```cpp + string foo = "Hello world"; + if (!foo.c_str()) + // ... + + void * bar = malloc(); + if (!bar) + // ... + ``` +
## CMakeLists-specific -- cgit v1.2.3