Formatting

This commit is contained in:
Jonas Kvinge
2025-12-08 23:49:48 +01:00
parent 109ff90401
commit 93af866185
179 changed files with 1187 additions and 1269 deletions

View File

@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public License
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
*/
*/
#ifndef LAZY_H
#define LAZY_H
@@ -37,7 +37,7 @@ class Lazy {
// Convenience constructor that will lazily default construct the object.
Lazy() : init_([]() { return new T; }) {}
T* get() const {
T *get() const {
CheckInitialized();
return ptr_.get();
}
@@ -63,7 +63,7 @@ class Lazy {
private:
void CheckInitialized() const {
if (!ptr_) {
ptr_ = SharedPtr<T>(init_(), [](T*obj) { qLog(Debug) << obj << "deleted"; delete obj; });
ptr_ = SharedPtr<T>(init_(), [](T *obj) { qLog(Debug) << obj << "deleted"; delete obj; });
qLog(Debug) << &*ptr_ << "created";
}
}

View File

@@ -22,7 +22,7 @@
#include <memory>
template <typename T, typename D = std::default_delete<T>>
template<typename T, typename D = std::default_delete<T>>
using ScopedPtr = std::unique_ptr<T, D>;
#endif // SCOPED_PTR_H