- Prefer
const
. - Prefer stack allocations (i.e. values rather than pointers or references).
- When heap allocation is necessary (e.g for polymorphism), prefer smart
pointers to automatically handle lifespan and ownership.
- Use
std::unique_ptr
for objects that should live until the end of scope. - Use
std::shared_ptr
for reference counting.
- Use
- Use
std::weak_ptr
to safely access potentially deleted objects managed by
diff --git a/sway/desktop/output.c b/sway/desktop/output.c | |
index 68f095c0..cc884b76 100644 | |
--- a/sway/desktop/output.c | |
+++ b/sway/desktop/output.c | |
@@ -287,51 +287,26 @@ static void output_for_each_surface(struct sway_output *output, | |
}; | |
struct sway_workspace *workspace = output_get_active_workspace(output); | |
- struct sway_container *fullscreen_con = root->fullscreen_global; | |
- if (!fullscreen_con) { |
C++ package management can be complicated.
Below are some key tools involved:
Make runs commands defined in a Makefile, for example, to build and install programs with the compiler and linker. For our purposes, we won't worry about what this looks like; you only need to understand its purpose in relation to CMake.
So, you've created a Python app (be it a graphical user interface with Qt or the like, or a simple command line interface). Great! But how are others going to use it? Python applications often have dependencies (e.g. from third-party modules), and they also need a Python interpreter to run them. For a developer, installing all the necessary bits and bobs to make things work is okay, but that's unacceptable for a normal user - they just want to download the thing and run it.
Below are simple instructions to publish your app on the three main operating systems: Windows, macOS and Linux.