diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-05-29 10:45:37 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-25 10:44:05 +0200 |
commit | 7be4e64b4bac6e6b5a90eec74b9f2b661c60db3a (patch) | |
tree | 41d2f586576787ffa71e567398391f7ab504ae89 /sources/shiboken2/libshiboken | |
parent | e5595a4b3010b1bb4b6f80a0339271a7b26934de (diff) |
shiboken: Replace 'typedef' by 'using'
Apply Fixits by Qt Creator with some amendments.
Remove iterator types by using auto instead.
Change-Id: I8a75323da6ae5cdcc6b67af8be9376408953986b
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/libshiboken')
-rw-r--r-- | sources/shiboken2/libshiboken/basewrapper_p.h | 4 | ||||
-rw-r--r-- | sources/shiboken2/libshiboken/bindingmanager.cpp | 6 | ||||
-rw-r--r-- | sources/shiboken2/libshiboken/helper.h | 2 | ||||
-rw-r--r-- | sources/shiboken2/libshiboken/sbkconverter.cpp | 2 | ||||
-rw-r--r-- | sources/shiboken2/libshiboken/sbkconverter_p.h | 4 | ||||
-rw-r--r-- | sources/shiboken2/libshiboken/sbkmodule.cpp | 4 |
6 files changed, 11 insertions, 11 deletions
diff --git a/sources/shiboken2/libshiboken/basewrapper_p.h b/sources/shiboken2/libshiboken/basewrapper_p.h index d119c7ec6..56a647b21 100644 --- a/sources/shiboken2/libshiboken/basewrapper_p.h +++ b/sources/shiboken2/libshiboken/basewrapper_p.h @@ -58,7 +58,7 @@ namespace Shiboken * This mapping associates a method and argument of an wrapper object with the wrapper of * said argument when it needs the binding to help manage its reference count. */ -typedef std::unordered_multimap<std::string, PyObject *> RefCountMap; +using RefCountMap = std::unordered_multimap<std::string, PyObject *> ; /// Linked list of SbkBaseWrapper pointers using ChildrenList = std::set<SbkObject *>; @@ -198,7 +198,7 @@ private: class BaseAccumulatorVisitor : public HierarchyVisitor { public: - typedef std::vector<SbkObjectType *> Result; + using Result = std::vector<SbkObjectType *>; bool visit(SbkObjectType *node) override; diff --git a/sources/shiboken2/libshiboken/bindingmanager.cpp b/sources/shiboken2/libshiboken/bindingmanager.cpp index 97ffb1cf2..b6660a5bc 100644 --- a/sources/shiboken2/libshiboken/bindingmanager.cpp +++ b/sources/shiboken2/libshiboken/bindingmanager.cpp @@ -52,13 +52,13 @@ namespace Shiboken { -typedef std::unordered_map<const void *, SbkObject *> WrapperMap; +using WrapperMap = std::unordered_map<const void *, SbkObject *>; class Graph { public: - typedef std::vector<SbkObjectType *> NodeList; - typedef std::unordered_map<SbkObjectType *, NodeList> Edges; + using NodeList = std::vector<SbkObjectType *>; + using Edges = std::unordered_map<SbkObjectType *, NodeList>; Edges m_edges; diff --git a/sources/shiboken2/libshiboken/helper.h b/sources/shiboken2/libshiboken/helper.h index 6c29ad728..eca87b351 100644 --- a/sources/shiboken2/libshiboken/helper.h +++ b/sources/shiboken2/libshiboken/helper.h @@ -90,7 +90,7 @@ class AutoArrayPointer T *data; }; -typedef unsigned long long ThreadId; +using ThreadId = unsigned long long; LIBSHIBOKEN_API ThreadId currentThreadId(); LIBSHIBOKEN_API ThreadId mainThreadId(); diff --git a/sources/shiboken2/libshiboken/sbkconverter.cpp b/sources/shiboken2/libshiboken/sbkconverter.cpp index b5246932f..a7b66b8cc 100644 --- a/sources/shiboken2/libshiboken/sbkconverter.cpp +++ b/sources/shiboken2/libshiboken/sbkconverter.cpp @@ -51,7 +51,7 @@ static SbkConverter **PrimitiveTypeConverters; -typedef std::unordered_map<std::string, SbkConverter *> ConvertersMap; +using ConvertersMap = std::unordered_map<std::string, SbkConverter *>; static ConvertersMap converters; namespace Shiboken { diff --git a/sources/shiboken2/libshiboken/sbkconverter_p.h b/sources/shiboken2/libshiboken/sbkconverter_p.h index 84de2099a..5af1b3fd5 100644 --- a/sources/shiboken2/libshiboken/sbkconverter_p.h +++ b/sources/shiboken2/libshiboken/sbkconverter_p.h @@ -54,8 +54,8 @@ extern "C" { -typedef std::pair<IsConvertibleToCppFunc, PythonToCppFunc> ToCppConversion; -typedef std::vector<ToCppConversion> ToCppConversionVector; +using ToCppConversion = std::pair<IsConvertibleToCppFunc, PythonToCppFunc>; +using ToCppConversionVector = std::vector<ToCppConversion>; /** * \internal diff --git a/sources/shiboken2/libshiboken/sbkmodule.cpp b/sources/shiboken2/libshiboken/sbkmodule.cpp index 7864471c0..9321725d6 100644 --- a/sources/shiboken2/libshiboken/sbkmodule.cpp +++ b/sources/shiboken2/libshiboken/sbkmodule.cpp @@ -43,10 +43,10 @@ #include <unordered_map> /// This hash maps module objects to arrays of Python types. -typedef std::unordered_map<PyObject *, PyTypeObject **> ModuleTypesMap; +using ModuleTypesMap = std::unordered_map<PyObject *, PyTypeObject **> ; /// This hash maps module objects to arrays of converters. -typedef std::unordered_map<PyObject *, SbkConverter **> ModuleConvertersMap; +using ModuleConvertersMap = std::unordered_map<PyObject *, SbkConverter **>; /// All types produced in imported modules are mapped here. static ModuleTypesMap moduleTypes; |