Merge pull request #10756 from Repiteo/style/pragma-once

Style: Integrate new `#pragma once` syntax
This commit is contained in:
Matthew
2025-04-15 19:09:39 -04:00
committed by GitHub
10 changed files with 24 additions and 79 deletions
@@ -49,8 +49,7 @@ To create a thread, use the following code:
.. code-tab:: cpp C++ .H File
#ifndef MULTITHREADING_DEMO_H
#define MULTITHREADING_DEMO_H
#pragma once
#include <godot_cpp/classes/node.hpp>
#include <godot_cpp/classes/thread.hpp>
@@ -74,8 +73,6 @@ To create a thread, use the following code:
};
} // namespace godot
#endif // MULTITHREADING_DEMO_H
.. code-tab:: cpp C++ .CPP File
#include "multithreading_demo.h"
@@ -209,8 +206,7 @@ Here is an example of using a Mutex:
.. code-tab:: cpp C++ .H File
#ifndef MUTEX_DEMO_H
#define MUTEX_DEMO_H
#pragma once
#include <godot_cpp/classes/mutex.hpp>
#include <godot_cpp/classes/node.hpp>
@@ -237,8 +233,6 @@ Here is an example of using a Mutex:
};
} // namespace godot
#endif // MUTEX_DEMO_H
.. code-tab:: cpp C++ .CPP File
#include "mutex_demo.h"
@@ -379,8 +373,7 @@ ready to be processed:
.. code-tab:: cpp C++ .H File
#ifndef SEMAPHORE_DEMO_H
#define SEMAPHORE_DEMO_H
#pragma once
#include <godot_cpp/classes/mutex.hpp>
#include <godot_cpp/classes/node.hpp>
@@ -412,8 +405,6 @@ ready to be processed:
};
} // namespace godot
#endif // SEMAPHORE_DEMO_H
.. code-tab:: cpp C++ .CPP File
#include "semaphore_demo.h"