From 7be4e64b4bac6e6b5a90eec74b9f2b661c60db3a Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 29 May 2019 10:45:37 +0200 Subject: 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 --- sources/shiboken2/libshiboken/basewrapper_p.h | 4 ++-- sources/shiboken2/libshiboken/bindingmanager.cpp | 6 +++--- sources/shiboken2/libshiboken/helper.h | 2 +- sources/shiboken2/libshiboken/sbkconverter.cpp | 2 +- sources/shiboken2/libshiboken/sbkconverter_p.h | 4 ++-- sources/shiboken2/libshiboken/sbkmodule.cpp | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) (limited to 'sources/shiboken2/libshiboken') 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 RefCountMap; +using RefCountMap = std::unordered_multimap ; /// Linked list of SbkBaseWrapper pointers using ChildrenList = std::set; @@ -198,7 +198,7 @@ private: class BaseAccumulatorVisitor : public HierarchyVisitor { public: - typedef std::vector Result; + using Result = std::vector; 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 WrapperMap; +using WrapperMap = std::unordered_map; class Graph { public: - typedef std::vector NodeList; - typedef std::unordered_map Edges; + using NodeList = std::vector; + using Edges = std::unordered_map; 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 ConvertersMap; +using ConvertersMap = std::unordered_map; 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 ToCppConversion; -typedef std::vector ToCppConversionVector; +using ToCppConversion = std::pair; +using ToCppConversionVector = std::vector; /** * \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 /// This hash maps module objects to arrays of Python types. -typedef std::unordered_map ModuleTypesMap; +using ModuleTypesMap = std::unordered_map ; /// This hash maps module objects to arrays of converters. -typedef std::unordered_map ModuleConvertersMap; +using ModuleConvertersMap = std::unordered_map; /// All types produced in imported modules are mapped here. static ModuleTypesMap moduleTypes; -- cgit v1.2.3