mirror of
https://github.com/ModOrganizer2/modorganizer-plugin_python.git
synced 2026-07-27 14:03:33 -07:00
Fix some formatting with clang-format.
This commit is contained in:
@@ -8,5 +8,5 @@ jobs:
|
||||
- name: Run clang-format
|
||||
uses: jidicula/clang-format-action@v4.11.0
|
||||
with:
|
||||
clang-format-version: "13"
|
||||
clang-format-version: "15"
|
||||
check-path: "."
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
#define IDR_LOADER_DLL 100
|
||||
|
||||
#endif // RESOURCE_H
|
||||
#endif // RESOURCE_H
|
||||
|
||||
@@ -25,8 +25,7 @@ namespace pybind11::detail::qt {
|
||||
|
||||
template <typename T>
|
||||
struct MetaData<T, std::enable_if_t<std::is_pointer_v<T>>>
|
||||
: MetaData<std::remove_pointer_t<T>> {
|
||||
};
|
||||
: MetaData<std::remove_pointer_t<T>> {};
|
||||
|
||||
// template class for most Qt types that have Python equivalent (QWidget,
|
||||
// etc.)
|
||||
|
||||
@@ -9,41 +9,36 @@
|
||||
#include <pybind11/stl.h>
|
||||
|
||||
// this needs to be included here to get proper QVariantList and QVariantMap
|
||||
#include "details/pybind11_qt_qlist.h"
|
||||
#include "details/pybind11_qt_qmap.h"
|
||||
#include "pybind11_qt_basic.h"
|
||||
#include "details/pybind11_qt_qlist.h"
|
||||
|
||||
namespace pybind11::detail {
|
||||
|
||||
// QList
|
||||
//
|
||||
template <class T>
|
||||
struct type_caster<QList<T>> : qt::qlist_caster<QList<T>, T> {
|
||||
};
|
||||
struct type_caster<QList<T>> : qt::qlist_caster<QList<T>, T> {};
|
||||
|
||||
// QSet
|
||||
//
|
||||
template <class T>
|
||||
struct type_caster<QSet<T>> : set_caster<QList<T>, T> {
|
||||
};
|
||||
struct type_caster<QSet<T>> : set_caster<QList<T>, T> {};
|
||||
|
||||
// QMap
|
||||
//
|
||||
template <class K, class V>
|
||||
struct type_caster<QMap<K, V>> : qt::qmap_caster<QMap<K, V>, K, V> {
|
||||
};
|
||||
struct type_caster<QMap<K, V>> : qt::qmap_caster<QMap<K, V>, K, V> {};
|
||||
|
||||
// QStringList
|
||||
//
|
||||
template <>
|
||||
struct type_caster<QStringList> : qt::qlist_caster<QStringList, QString> {
|
||||
};
|
||||
struct type_caster<QStringList> : qt::qlist_caster<QStringList, QString> {};
|
||||
|
||||
// QVariantList
|
||||
//
|
||||
template <>
|
||||
struct type_caster<QVariantList> : qt::qlist_caster<QVariantList, QVariant> {
|
||||
};
|
||||
struct type_caster<QVariantList> : qt::qlist_caster<QVariantList, QVariant> {};
|
||||
|
||||
// QVariantMap
|
||||
//
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
}; \
|
||||
} \
|
||||
template <> \
|
||||
struct type_caster<QEnum> : qt::qt_enum_caster<QEnum> { \
|
||||
}; \
|
||||
struct type_caster<QEnum> : qt::qt_enum_caster<QEnum> {}; \
|
||||
}
|
||||
|
||||
PYQT_ENUM(QtCore, Qt::AlignmentFlag);
|
||||
|
||||
@@ -30,13 +30,11 @@
|
||||
template <> \
|
||||
struct type_caster<QClass*> \
|
||||
: std::conditional_t<std::is_copy_constructible_v<QClass>, \
|
||||
type_caster_generic, qt::qt_type_caster<QClass*>> { \
|
||||
}; \
|
||||
type_caster_generic, qt::qt_type_caster<QClass*>> {}; \
|
||||
template <> \
|
||||
struct type_caster<QClass> \
|
||||
: std::conditional_t<std::is_copy_constructible_v<QClass>, \
|
||||
qt::qt_type_caster<QClass>, type_caster<QClass*>> { \
|
||||
}; \
|
||||
qt::qt_type_caster<QClass>, type_caster<QClass*>> {}; \
|
||||
}
|
||||
|
||||
// add declarations below to create bindings - the first argument is simply
|
||||
|
||||
@@ -97,10 +97,7 @@ namespace pybind11::detail {
|
||||
: f(std::move(f_))
|
||||
{
|
||||
}
|
||||
func_handle(const func_handle& f_)
|
||||
{
|
||||
operator=(f_);
|
||||
}
|
||||
func_handle(const func_handle& f_) { operator=(f_); }
|
||||
func_handle& operator=(const func_handle& f_)
|
||||
{
|
||||
gil_scoped_acquire acq;
|
||||
|
||||
@@ -80,13 +80,11 @@ namespace mo2::python::detail {
|
||||
template <> \
|
||||
struct type_caster<std::shared_ptr<Type>> \
|
||||
: mo2::python::detail::shared_cpp_owner_caster<Type, \
|
||||
std::shared_ptr<Type>> { \
|
||||
}; \
|
||||
std::shared_ptr<Type>> {}; \
|
||||
template <> \
|
||||
struct type_caster<std::shared_ptr<const Type>> \
|
||||
: mo2::python::detail::shared_cpp_owner_caster< \
|
||||
Type, std::shared_ptr<const Type>> { \
|
||||
}; \
|
||||
Type, std::shared_ptr<const Type>> {}; \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -173,8 +173,7 @@ namespace pybind11::detail {
|
||||
|
||||
template <class... Args>
|
||||
struct type_caster<::mo2::python::smart_variant<Args...>>
|
||||
: variant_caster<::mo2::python::smart_variant<Args...>> {
|
||||
};
|
||||
: variant_caster<::mo2::python::smart_variant<Args...>> {};
|
||||
|
||||
} // namespace pybind11::detail
|
||||
|
||||
|
||||
Reference in New Issue
Block a user