chore: replace simple cases of typedef with using

This commit is contained in:
sithlord48
2024-11-27 11:51:48 -05:00
committed by Chris Rizzitello
parent 1d43e7c626
commit 2349ce7f52
56 changed files with 181 additions and 164 deletions

View File

@ -165,6 +165,6 @@ private:
static const char *m_LockCursorModeNames[];
};
typedef QList<Action> ActionList;
using ActionList = QList<Action>;
QTextStream &operator<<(QTextStream &outStream, const Action &action);

View File

@ -72,6 +72,6 @@ private:
ActionList m_Actions;
};
typedef QList<Hotkey> HotkeyList;
using HotkeyList = QList<Hotkey>;
QTextStream &operator<<(QTextStream &outStream, const Hotkey &hotkey);

View File

@ -33,7 +33,7 @@ class ArchCondImpl;
\brief Opaque condition variable type.
An opaque type representing a condition variable.
*/
typedef ArchCondImpl *ArchCond;
using ArchCond = ArchCondImpl *;
/*!
\class ArchMutexImpl
@ -47,7 +47,7 @@ class ArchMutexImpl;
\brief Opaque mutex type.
An opaque type representing a mutex.
*/
typedef ArchMutexImpl *ArchMutex;
using ArchMutex = ArchMutexImpl *;
/*!
\class ArchThreadImpl
@ -61,7 +61,7 @@ class ArchThreadImpl;
\brief Opaque thread type.
An opaque type representing a thread.
*/
typedef ArchThreadImpl *ArchThread;
using ArchThread = ArchThreadImpl *;
//! Interface for architecture dependent multithreading
/*!
@ -74,7 +74,7 @@ public:
//! Type of thread entry point
typedef void *(*ThreadFunc)(void *);
//! Type of thread identifier
typedef unsigned int ThreadID;
using ThreadID = unsigned int;
//! Types of signals
/*!
Not all platforms support all signals. Unsupported signals are

View File

@ -24,7 +24,7 @@
#include <vector>
class ArchThreadImpl;
typedef ArchThreadImpl *ArchThread;
using ArchThread = ArchThreadImpl *;
/*!
\class ArchSocketImpl
@ -38,7 +38,7 @@ class ArchSocketImpl;
\brief Opaque socket type.
An opaque type representing a socket.
*/
typedef ArchSocketImpl *ArchSocket;
using ArchSocket = ArchSocketImpl *;
/*!
\class ArchNetAddressImpl
@ -53,7 +53,7 @@ class ArchNetAddressImpl;
\brief Opaque network address type.
An opaque type representing a network address.
*/
typedef ArchNetAddressImpl *ArchNetAddress;
using ArchNetAddress = ArchNetAddressImpl *;
//! Interface for architecture dependent networking
/*!

View File

@ -34,7 +34,7 @@ class IArchTaskBarReceiver : public IInterface
{
public:
// Icon data is architecture dependent
typedef void *Icon;
using Icon = void *;
//! @name manipulators
//@{

View File

@ -106,7 +106,7 @@ private:
static void *threadSignalHandler(void *vrep);
private:
typedef std::list<ArchThread> ThreadList;
using ThreadList = std::list<ArchThread>;
static ArchMultithreadPosix *s_instance;

View File

@ -41,7 +41,7 @@ struct sockaddr_storage
#endif
#if !HAVE_SOCKLEN_T
typedef int socklen_t;
using socklen_t = int;
#endif
#include <poll.h>
@ -52,7 +52,7 @@ typedef int socklen_t;
// old systems may use char* for [gs]etsockopt()'s optval argument.
// this should be void on modern systems but char is forwards
// compatible so we always use it.
typedef char optval_t;
using optval_t = char;
class ArchSocketImpl
{

View File

@ -385,8 +385,8 @@ void ArchDaemonWindows::setStatusError(DWORD error)
void ArchDaemonWindows::serviceMain(DWORD argc, LPTSTR *argvIn)
{
typedef std::vector<LPCTSTR> ArgList;
typedef std::vector<std::string> Arguments;
using ArgList = std::vector<LPCTSTR>;
using Arguments = std::vector<std::string>;
const char **argv = const_cast<const char **>(argvIn);
// create synchronization objects

View File

@ -38,7 +38,7 @@
#ifndef ES_CONTINUOUS
#define ES_CONTINUOUS ((DWORD)0x80000000)
#endif
typedef DWORD EXECUTION_STATE;
using EXECUTION_STATE = DWORD;
//
// ArchMiscWindows
@ -467,4 +467,4 @@ void ArchMiscWindows::setInstanceWin32(HINSTANCE instance)
{
assert(instance != NULL);
s_instanceWin32 = instance;
}
}

View File

@ -190,7 +190,7 @@ private:
static DWORD WINAPI dummySetThreadExecutionState(DWORD);
private:
typedef std::set<HWND> Dialogs;
using Dialogs = std::set<HWND>;
typedef DWORD(WINAPI *STES_t)(DWORD);
static Dialogs *s_dialogs;

View File

@ -109,7 +109,7 @@ private:
static unsigned int __stdcall threadFunc(void *vrep);
private:
typedef std::list<ArchThread> ThreadList;
using ThreadList = std::list<ArchThread>;
static ArchMultithreadWindows *s_instance;

View File

@ -106,7 +106,7 @@ private:
void throwNameError(int);
private:
typedef std::list<WSAEVENT> EventList;
using EventList = std::list<WSAEVENT>;
ArchMutex m_mutex;
EventList m_unblockEvents;

View File

@ -63,10 +63,10 @@ private:
UINT m_id;
};
typedef std::map<IArchTaskBarReceiver *, ReceiverInfo> ReceiverToInfoMap;
typedef std::map<UINT, ReceiverToInfoMap::iterator> CIDToReceiverMap;
typedef std::vector<UINT> CIDStack;
typedef std::map<HWND, bool> Dialogs;
using ReceiverToInfoMap = std::map<IArchTaskBarReceiver *, ReceiverInfo>;
using CIDToReceiverMap = std::map<UINT, ReceiverToInfoMap::iterator>;
using CIDStack = std::vector<UINT>;
using Dialogs = std::map<HWND, bool>;
UINT getNextID();
void recycleID(UINT);

View File

@ -39,7 +39,7 @@ A \c Event holds an event type and a pointer to event data.
class Event
{
public:
typedef UInt32 Type;
using Type = UInt32;
enum
{
kUnknown, //!< The event type is unknown
@ -49,7 +49,7 @@ public:
kLast //!< Must be last
};
typedef UInt32 Flags;
using Flags = UInt32;
enum
{
kNone = 0x00, //!< No flags

View File

@ -102,14 +102,14 @@ private:
double m_time;
};
typedef std::set<EventQueueTimer *> Timers;
typedef PriorityQueue<Timer> TimerQueue;
typedef std::map<UInt32, Event> EventTable;
typedef std::vector<UInt32> EventIDList;
typedef std::map<Event::Type, const char *> TypeMap;
typedef std::map<String, Event::Type> NameMap;
typedef std::map<Event::Type, IEventJob *> TypeHandlerTable;
typedef std::map<void *, TypeHandlerTable> HandlerTable;
using Timers = std::set<EventQueueTimer *>;
using TimerQueue = PriorityQueue<Timer>;
using EventTable = std::map<UInt32, Event>;
using EventIDList = std::vector<UInt32>;
using TypeMap = std::map<Event::Type, const char *>;
using NameMap = std::map<String, Event::Type>;
using TypeHandlerTable = std::map<Event::Type, IEventJob *>;
using HandlerTable = std::map<void *, TypeHandlerTable>;
int m_systemTarget;
ArchMutex m_mutex;

View File

@ -136,7 +136,7 @@ private:
void output(ELevel priority, char *msg);
private:
typedef std::list<ILogOutputter *> OutputterList;
using OutputterList = std::list<ILogOutputter *>;
static Log *s_log;

View File

@ -39,11 +39,11 @@ template <
class PriorityQueue
{
public:
typedef typename Container::value_type value_type;
typedef typename Container::size_type size_type;
typedef typename Container::iterator iterator;
typedef typename Container::const_iterator const_iterator;
typedef Container container_type;
using value_type = Container::value_type;
using size_type = Container::size_type;
using iterator = Container::iterator;
using const_iterator = Container::const_iterator;
using container_type = Container;
PriorityQueue()
{

View File

@ -49,7 +49,7 @@ public:
virtual void deleteTimer(EventQueueTimer *) const;
private:
typedef std::deque<UInt32> EventDeque;
using EventDeque = std::deque<UInt32>;
ArchMutex m_queueMutex;
ArchCond m_queueReadyCond;

View File

@ -137,10 +137,10 @@ This outputter records the last N log messages.
class BufferedLogOutputter : public ILogOutputter
{
private:
typedef std::deque<String> Buffer;
using Buffer = std::deque<String>;
public:
typedef Buffer::const_iterator const_iterator;
using const_iterator = Buffer::const_iterator;
BufferedLogOutputter(UInt32 maxBufferSize);
virtual ~BufferedLogOutputter();

View File

@ -84,12 +84,12 @@
#if defined(__APPLE__)
#include <CoreServices/CoreServices.h>
#else
typedef signed TYPE_OF_SIZE_1 SInt8;
typedef signed TYPE_OF_SIZE_2 SInt16;
typedef signed TYPE_OF_SIZE_4 SInt32;
typedef unsigned TYPE_OF_SIZE_1 UInt8;
typedef unsigned TYPE_OF_SIZE_2 UInt16;
typedef unsigned TYPE_OF_SIZE_4 UInt32;
using SInt8 = signed TYPE_OF_SIZE_1;
using SInt16 = signed TYPE_OF_SIZE_2;
using SInt32 = signed TYPE_OF_SIZE_4;
using UInt8 = unsigned TYPE_OF_SIZE_1;
using UInt16 = unsigned TYPE_OF_SIZE_2;
using UInt32 = unsigned TYPE_OF_SIZE_4;
#endif
#endif
//

View File

@ -63,10 +63,10 @@ namespace std {
class stringbuf : public streambuf
{
public:
typedef char char_type;
typedef int int_type;
typedef streampos pos_type;
typedef streamoff off_type;
using char_type = char;
using int_type = int;
using pos_type = streampos;
using off_type = streamoff;
explicit stringbuf(int which = ios::in | ios::out)
: streambuf(),
@ -231,10 +231,10 @@ private:
class istringstream : public istream
{
public:
typedef char char_type;
typedef int int_type;
typedef streampos pos_type;
typedef streamoff off_type;
using char_type = char;
using int_type = int;
using pos_type = streampos;
using off_type = streamoff;
explicit istringstream(int which = ios::in) : istream(&sb), sb(which | ios::in)
{
@ -265,10 +265,10 @@ private:
class ostringstream : public ostream
{
public:
typedef char char_type;
typedef int int_type;
typedef streampos pos_type;
typedef streamoff off_type;
using char_type = char;
using int_type = int;
using pos_type = streampos;
using off_type = streamoff;
explicit ostringstream(int which = ios::out) : ostream(&sb), sb(which | ios::out)
{
@ -300,10 +300,10 @@ private:
class stringstream : public iostream
{
public:
typedef char char_type;
typedef int int_type;
typedef streampos pos_type;
typedef streamoff off_type;
using char_type = char;
using int_type = int;
using pos_type = streampos;
using off_type = streamoff;
explicit stringstream(int which = ios::out | ios::in) : iostream(&sb), sb(which)
{

View File

@ -22,7 +22,7 @@
#include "common/stdvector.h"
class DragInformation;
typedef std::vector<DragInformation> DragFileList;
using DragFileList = std::vector<DragInformation>;
class DragInformation
{

View File

@ -35,7 +35,7 @@ public:
arbitrary starting time. Timestamps will wrap around to 0
after about 49 3/4 days.
*/
typedef UInt32 Time;
using Time = UInt32;
//! Clipboard formats
/*!

View File

@ -64,7 +64,7 @@ public:
char m_screensBuffer[1];
};
typedef std::set<KeyButton> KeyButtonSet;
using KeyButtonSet = std::set<KeyButton>;
//! @name manipulators
//@{

View File

@ -76,7 +76,7 @@ public:
any modifier keys unless the KeyID is a modifier, in which case
it has exactly one KeyItem for the modifier itself.
*/
typedef std::vector<KeyItem> KeyItemList;
using KeyItemList = std::vector<KeyItem>;
//! A keystroke
class Keystroke
@ -119,13 +119,13 @@ public:
};
//! A sequence of keystrokes
typedef std::vector<Keystroke> Keystrokes;
using Keystrokes = std::vector<Keystroke>;
//! A mapping of a modifier to keys for that modifier
typedef std::multimap<KeyModifierMask, KeyItem> ModifierToKeys;
using ModifierToKeys = std::multimap<KeyModifierMask, KeyItem>;
//! A set of buttons
typedef std::map<KeyButton, const KeyItem *> ButtonToKeyMap;
using ButtonToKeyMap = std::map<KeyButton, const KeyItem *>;
//! Callback type for \c foreachKey
typedef void (*ForeachKeyCallback)(KeyID, SInt32 group, KeyItem &, void *userData);
@ -353,7 +353,7 @@ private:
};
// A list of ways to synthesize a KeyID
typedef std::vector<KeyItemList> KeyEntryList;
using KeyEntryList = std::vector<KeyItemList>;
// computes the number of groups
SInt32 findNumGroups() const;
@ -440,7 +440,7 @@ private:
static void initKeyNameMaps();
// Ways to synthesize a KeyID over multiple keyboard groups
typedef std::vector<KeyEntryList> KeyGroupTable;
using KeyGroupTable = std::vector<KeyEntryList>;
void addGroupToKeystroke(Keystrokes &keys, SInt32 &group, const String &lang) const;
@ -454,25 +454,25 @@ private:
private:
// Table of KeyID to ways to synthesize that KeyID
typedef std::map<KeyID, KeyGroupTable> KeyIDMap;
using KeyIDMap = std::map<KeyID, KeyGroupTable>;
// List of KeyItems that generate a particular modifier
typedef std::vector<const KeyItem *> ModifierKeyItemList;
using ModifierKeyItemList = std::vector<const KeyItem *>;
// Map a modifier to the KeyItems that synthesize that modifier
typedef std::vector<ModifierKeyItemList> ModifierToKeyTable;
using ModifierToKeyTable = std::vector<ModifierKeyItemList>;
// A set of keys
typedef std::set<KeyID> KeySet;
using KeySet = std::set<KeyID>;
// A set of buttons
typedef std::set<KeyButton> KeyButtonSet;
using KeyButtonSet = std::set<KeyButton>;
// Key maps for parsing/formatting
typedef std::map<String, KeyID, deskflow::string::CaselessCmp> NameToKeyMap;
typedef std::map<String, KeyModifierMask, deskflow::string::CaselessCmp> NameToModifierMap;
typedef std::map<KeyID, String> KeyToNameMap;
typedef std::map<KeyModifierMask, String> ModifierToNameMap;
using NameToKeyMap = std::map<String, KeyID, deskflow::string::CaselessCmp>;
using NameToModifierMap = std::map<String, KeyModifierMask, deskflow::string::CaselessCmp>;
using KeyToNameMap = std::map<KeyID, String>;
using ModifierToNameMap = std::map<KeyModifierMask, String>;
// KeyID info
KeyIDMap m_keyIDMap;

View File

@ -89,7 +89,7 @@ public:
}
protected:
typedef deskflow::KeyMap::Keystroke Keystroke;
using Keystroke = deskflow::KeyMap::Keystroke;
//! @name protected manipulators
//@{
@ -140,8 +140,8 @@ protected:
//@}
private:
typedef deskflow::KeyMap::Keystrokes Keystrokes;
typedef deskflow::KeyMap::ModifierToKeys ModifierToKeys;
using Keystrokes = deskflow::KeyMap::Keystrokes;
using ModifierToKeys = deskflow::KeyMap::ModifierToKeys;
public:
struct AddActiveModifierContext

View File

@ -61,7 +61,7 @@ public:
virtual std::string getToolTip() const;
protected:
typedef std::vector<String> Clients;
using Clients = std::vector<String>;
enum EState
{
kNotRunning,

View File

@ -24,7 +24,7 @@
/*!
Type to hold a clipboard identifier.
*/
typedef UInt8 ClipboardID;
using ClipboardID = UInt8;
//! @name Clipboard identifiers
//@{

View File

@ -26,7 +26,12 @@ Type to hold a key symbol identifier. The encoding is UTF-32, using
U+E000 through U+EFFF for the various control keys (e.g. arrow
keys, function keys, modifier keys, etc).
*/
// Typedef has to be used on mac os as this is used in objective-C
#if __APPLE__
typedef UInt32 KeyID;
#else
using KeyID = UInt32;
#endif
//! Key Code
/*!
@ -35,19 +40,31 @@ physical key on the keyboard. KeyButton 0 is reserved to be an
invalid key; platforms that use 0 as a physical key identifier
will have to remap that value to some arbitrary unused id.
*/
#if __APPLE__
typedef UInt16 KeyButton;
#else
using KeyButton = UInt16;
#endif
//! Modifier key mask
/*!
Type to hold a bitmask of key modifiers (e.g. shift keys).
*/
#if __APPLE__
typedef UInt32 KeyModifierMask;
#else
using KeyModifierMask = UInt32;
#endif
//! Modifier key ID
/*!
Type to hold the id of a key modifier (e.g. a shift key).
*/
#if __APPLE__
typedef UInt32 KeyModifierID;
#else
using KeyModifierID = UInt32;
#endif
//! @name Modifier key masks
//@{

View File

@ -24,7 +24,7 @@
/*!
Type to hold a mouse button identifier.
*/
typedef UInt8 ButtonID;
using ButtonID = UInt8;
//! @name Mouse button identifiers
//@{

View File

@ -25,16 +25,16 @@
/*!
Type to hold an option identifier.
*/
typedef UInt32 OptionID;
using OptionID = UInt32;
//! Option Value
/*!
Type to hold an option value.
*/
typedef SInt32 OptionValue;
using OptionValue = SInt32;
// for now, options are just pairs of integers
typedef std::vector<UInt32> OptionsList;
using OptionsList = std::vector<UInt32>;
// macro for packing 4 character strings into 4 byte integers
#define OPTION_CODE(_s) \

View File

@ -71,8 +71,8 @@ public:
private:
static const UInt32 kChunkSize;
typedef std::vector<UInt8> Chunk;
typedef std::list<Chunk> ChunkList;
using Chunk = std::vector<UInt8>;
using ChunkList = std::list<Chunk>;
ChunkList m_chunks;
UInt32 m_size;

View File

@ -98,7 +98,7 @@ private:
bool isRunning();
private:
typedef std::deque<String> Buffer;
using Buffer = std::deque<String>;
IpcServer &m_ipcServer;
Buffer m_buffer;

View File

@ -77,7 +77,7 @@ private:
void deleteClient(IpcClientProxy *proxy);
private:
typedef std::list<IpcClientProxy *> ClientList;
using ClientList = std::list<IpcClientProxy *>;
bool m_mock;
IEventQueue *m_events;

View File

@ -62,9 +62,9 @@ public:
private:
// list of jobs. we use a list so we can safely iterate over it
// while other threads modify it.
typedef std::list<ISocketMultiplexerJob *> SocketJobs;
typedef SocketJobs::iterator JobCursor;
typedef std::map<ISocket *, JobCursor> SocketJobMap;
using SocketJobs = std::list<ISocketMultiplexerJob *>;
using JobCursor = SocketJobs::iterator;
using SocketJobMap = std::map<ISocket *, JobCursor>;
// service sockets. the service thread will only access m_sockets
// and m_update while m_pollable and m_polling are true. all other

View File

@ -75,7 +75,7 @@ private:
static UINT getOwnershipFormat();
private:
typedef std::vector<IMSWindowsClipboardConverter *> ConverterList;
using ConverterList = std::vector<IMSWindowsClipboardConverter *>;
HWND m_window;
mutable Time m_time;

View File

@ -202,7 +202,7 @@ private:
HWND m_foregroundWindow;
bool m_lowLevel;
};
typedef std::map<String, Desk *> Desks;
using Desks = std::map<String, Desk *>;
// initialization and shutdown operations
HCURSOR createBlankCursor() const;

View File

@ -178,7 +178,7 @@ protected:
virtual KeyModifierMask &getActiveModifiersRValue();
private:
typedef std::vector<HKL> GroupList;
using GroupList = std::vector<HKL>;
// send ctrl+alt+del hotkey event on NT family
static void ctrlAltDelThread(void *);
@ -198,8 +198,8 @@ private:
MSWindowsKeyState &operator=(const MSWindowsKeyState &);
private:
typedef std::map<HKL, SInt32> GroupMap;
typedef std::map<KeyID, UINT> KeyToVKMap;
using GroupMap = std::map<HKL, SInt32>;
using KeyToVKMap = std::map<KeyID, UINT>;
void *m_eventTarget;
MSWindowsDesks *m_desks;

View File

@ -260,10 +260,10 @@ private:
UINT m_keycode;
UINT m_mask;
};
typedef std::map<UInt32, HotKeyItem> HotKeyMap;
typedef std::vector<UInt32> HotKeyIDList;
typedef std::map<HotKeyItem, UInt32> HotKeyToIDMap;
typedef std::vector<KeyButton> PrimaryKeyDownList;
using HotKeyMap = std::map<UInt32, HotKeyItem>;
using HotKeyIDList = std::vector<UInt32>;
using HotKeyToIDMap = std::map<HotKeyItem, UInt32>;
using PrimaryKeyDownList = std::vector<KeyButton>;
static HINSTANCE s_windowInstance;

View File

@ -50,7 +50,7 @@ private:
void clearConverters();
private:
typedef std::vector<IOSXClipboardConverter *> ConverterList;
using ConverterList = std::vector<IOSXClipboardConverter *>;
mutable Time m_time;
ConverterList m_converters;

View File

@ -35,7 +35,7 @@ A key state for OS X.
class OSXKeyState : public KeyState
{
public:
typedef std::vector<KeyID> KeyIDs;
using KeyIDs = std::vector<KeyID>;
OSXKeyState(IEventQueue *events, std::vector<String> layouts, bool isLangSyncEnabled);
OSXKeyState(IEventQueue *events, deskflow::KeyMap &keyMap, std::vector<String> layouts, bool isLangSyncEnabled);
@ -160,8 +160,8 @@ private:
KeyButtonOffset = 1
};
typedef std::map<CFDataRef, SInt32> GroupMap;
typedef std::map<UInt32, KeyID> VirtualKeyMap;
using GroupMap = std::map<CFDataRef, SInt32>;
using VirtualKeyMap = std::map<UInt32, KeyID>;
VirtualKeyMap m_virtualKeyMap;
mutable UInt32 m_deadKeyState;

View File

@ -36,7 +36,7 @@
extern "C"
{
typedef int CGSConnectionID;
using CGSConnectionID = int;
CGError CGSSetConnectionProperty(CGSConnectionID cid, CGSConnectionID targetCID, CFStringRef key, CFTypeRef value);
int _CGSDefaultConnection();
}
@ -242,10 +242,10 @@ private:
std::bitset<NumButtonIDs> m_buttons;
};
typedef std::map<UInt32, HotKeyItem> HotKeyMap;
typedef std::vector<UInt32> HotKeyIDList;
typedef std::map<KeyModifierMask, UInt32> ModifierHotKeyMap;
typedef std::map<HotKeyItem, UInt32> HotKeyToIDMap;
using HotKeyMap = std::map<UInt32, HotKeyItem>;
using HotKeyIDList = std::vector<UInt32>;
using ModifierHotKeyMap = std::map<KeyModifierMask, UInt32>;
using HotKeyToIDMap = std::map<HotKeyItem, UInt32>;
// true if screen is being used as a primary screen, false otherwise
bool m_isPrimary;
@ -272,7 +272,7 @@ private:
Evil, and this should be moved to a place where it need not
be mutable as soon as possible. */
mutable MouseButtonState m_buttonState;
typedef std::map<UInt16, CGEventType> MouseButtonEventMapType;
using MouseButtonEventMapType = std::map<UInt16, CGEventType>;
std::vector<MouseButtonEventMapType> MouseButtonEventMap;
bool m_cursorHidden;

View File

@ -22,7 +22,7 @@
#include <Carbon/Carbon.h>
typedef TISInputSourceRef KeyLayout;
using KeyLayout = TISInputSourceRef;
class OSXUchrKeyResource : public IOSXKeyResource
{
@ -38,7 +38,7 @@ public:
virtual KeyID getKey(UInt32 table, UInt32 button) const;
private:
typedef std::vector<KeyID> KeySequence;
using KeySequence = std::vector<KeyID>;
bool getDeadKey(KeySequence &keys, UInt16 index) const;
bool getKeyRecord(KeySequence &keys, UInt16 index, UInt16 &state) const;

View File

@ -680,7 +680,7 @@ void XWindowsClipboard::motifFillCache()
auto formats = static_cast<const SInt32 *>(static_cast<const void *>(item.m_size + data.data()));
// get the available formats
typedef std::map<Atom, String> MotifFormatMap;
using MotifFormatMap = std::map<Atom, String>;
MotifFormatMap motifFormats;
for (SInt32 i = 0; i < numFormats; ++i) {
// get Motif format property from the root window

View File

@ -258,9 +258,9 @@ protected:
// index of next byte in m_data to send
UInt32 m_ptr;
};
typedef std::list<Reply *> ReplyList;
typedef std::map<Window, ReplyList> ReplyMap;
typedef std::map<Window, long> ReplyEventMask;
using ReplyList = std::list<Reply *>;
using ReplyMap = std::map<Window, ReplyList>;
using ReplyEventMask = std::map<Window, long>;
// ICCCM interoperability methods
void icccmFillCache();
@ -291,7 +291,7 @@ protected:
Atom getTimestampData(String &, int *format) const;
private:
typedef std::vector<IXWindowsClipboardConverter *> ConverterList;
using ConverterList = std::vector<IXWindowsClipboardConverter *>;
Display *m_display;
Window m_window;

View File

@ -59,7 +59,7 @@ private:
int getPendingCountLocked();
private:
typedef std::vector<XEvent> EventList;
using EventList = std::vector<XEvent>;
Mutex m_mutex;
Display *m_display;

View File

@ -45,7 +45,7 @@ A key state for X Windows.
class XWindowsKeyState : public KeyState
{
public:
typedef std::vector<int> KeycodeList;
using KeycodeList = std::vector<int>;
enum
{
kGroupPoll = -1,
@ -142,13 +142,13 @@ private:
#ifdef TEST_ENV
public: // yuck
#endif
typedef std::vector<KeyModifierMask> KeyModifierMaskList;
using KeyModifierMaskList = std::vector<KeyModifierMask>;
private:
typedef std::map<KeyModifierMask, unsigned int> KeyModifierToXMask;
typedef std::multimap<KeyID, KeyCode> KeyToKeyCodeMap;
typedef std::map<KeyCode, unsigned int> NonXKBModifierMap;
typedef std::map<UInt32, XKBModifierInfo> XKBModifierMap;
using KeyModifierToXMask = std::map<KeyModifierMask, unsigned int>;
using KeyToKeyCodeMap = std::multimap<KeyID, KeyCode>;
using NonXKBModifierMap = std::map<KeyCode, unsigned int>;
using XKBModifierMap = std::map<UInt32, XKBModifierInfo>;
Display *m_display;
#if HAVE_XKB_EXTENSION

View File

@ -172,11 +172,11 @@ private:
int m_keycode;
unsigned int m_mask;
};
typedef std::set<bool> FilteredKeycodes;
typedef std::vector<std::pair<int, unsigned int>> HotKeyList;
typedef std::map<UInt32, HotKeyList> HotKeyMap;
typedef std::vector<UInt32> HotKeyIDList;
typedef std::map<HotKeyItem, UInt32> HotKeyToIDMap;
using FilteredKeycodes = std::set<bool>;
using HotKeyList = std::vector<std::pair<int, unsigned int>>;
using HotKeyMap = std::map<UInt32, HotKeyList>;
using HotKeyIDList = std::vector<UInt32>;
using HotKeyToIDMap = std::map<HotKeyItem, UInt32>;
// true if screen is being used as a primary screen, false otherwise
bool m_isPrimary;

View File

@ -116,7 +116,7 @@ private:
bool isDPMSActivated() const;
private:
typedef std::map<Window, long> WatchList;
using WatchList = std::map<Window, long>;
// the X display
Display *m_display;

View File

@ -89,9 +89,9 @@ private:
void removeUnknownClient(ClientProxyUnknown *unknownClient);
private:
typedef std::set<ClientProxyUnknown *> NewClients;
typedef std::deque<ClientProxy *> WaitingClients;
typedef std::set<IDataSocket *> ClientSockets;
using NewClients = std::set<ClientProxyUnknown *>;
using WaitingClients = std::deque<ClientProxy *>;
using ClientSockets = std::set<IDataSocket *>;
IListenSocket *m_listen;
ISocketFactory *m_socketFactory;

View File

@ -1655,7 +1655,7 @@ std::ostream &operator<<(std::ostream &s, const Config &config)
// aliases section (if there are any)
if (config.m_map.size() != config.m_nameToCanonicalName.size()) {
// map canonical to alias
typedef std::multimap<String, String, CaselessCmp> CMNameMap;
using CMNameMap = std::multimap<String, String, CaselessCmp>;
CMNameMap aliases;
for (Config::NameMap::const_iterator index = config.m_nameToCanonicalName.begin();
index != config.m_nameToCanonicalName.end(); ++index) {

View File

@ -40,11 +40,11 @@ class IEventQueue;
namespace std {
template <> struct iterator_traits<deskflow::server::Config>
{
typedef String value_type;
typedef ptrdiff_t difference_type;
typedef bidirectional_iterator_tag iterator_category;
typedef String *pointer;
typedef String &reference;
using value_type = String;
using difference_type = ptrdiff_t;
using iterator_category = bidirectional_iterator_tag;
using pointer = String *;
using reference = String &;
};
}; // namespace std
@ -63,8 +63,8 @@ namespace and must be unique.
class Config
{
public:
typedef std::map<OptionID, OptionValue> ScreenOptions;
typedef std::pair<float, float> Interval;
using ScreenOptions = std::map<OptionID, OptionValue>;
using Interval = std::pair<float, float>;
class CellEdge
{
@ -119,10 +119,10 @@ private:
class Cell
{
private:
typedef std::map<CellEdge, CellEdge> EdgeLinks;
using EdgeLinks = std::map<CellEdge, CellEdge>;
public:
typedef EdgeLinks::const_iterator const_iterator;
using const_iterator = EdgeLinks::const_iterator;
bool add(const CellEdge &src, const CellEdge &dst);
void remove(EDirection side);
@ -147,13 +147,13 @@ private:
public:
ScreenOptions m_options;
};
typedef std::map<String, Cell, deskflow::string::CaselessCmp> CellMap;
typedef std::map<String, String, deskflow::string::CaselessCmp> NameMap;
using CellMap = std::map<String, Cell, deskflow::string::CaselessCmp>;
using NameMap = std::map<String, String, deskflow::string::CaselessCmp>;
public:
typedef Cell::const_iterator link_const_iterator;
typedef CellMap::const_iterator internal_const_iterator;
typedef NameMap::const_iterator all_const_iterator;
using link_const_iterator = Cell::const_iterator;
using internal_const_iterator = CellMap::const_iterator;
using all_const_iterator = NameMap::const_iterator;
class const_iterator : std::iterator_traits<Config>
{
public:
@ -522,7 +522,7 @@ Maintains a context when reading a configuration from a stream.
class ConfigReadContext
{
public:
typedef std::vector<String> ArgList;
using ArgList = std::vector<String>;
ConfigReadContext(std::istream &, SInt32 firstLine = 1);
~ConfigReadContext();

View File

@ -354,7 +354,7 @@ public:
void copy(const Rule &);
private:
typedef std::vector<Action *> ActionList;
using ActionList = std::vector<Action *>;
Condition *m_condition;
ActionList m_activateActions;
@ -364,7 +364,7 @@ public:
// -------------------------------------------------------------------------
// Input Filter Class
// -------------------------------------------------------------------------
typedef std::vector<Rule> RuleList;
using RuleList = std::vector<Rule>;
InputFilter(IEventQueue *events);
InputFilter(const InputFilter &);

View File

@ -2112,7 +2112,7 @@ void Server::closeClients(const ServerConfig &config)
{
// collect the clients that are connected but are being dropped
// from the configuration (or who's canonical name is changing).
typedef std::set<BaseClientProxy *> RemovedClients;
using RemovedClients = std::set<BaseClientProxy *>;
RemovedClients removed;
for (ClientList::iterator index = m_clients.begin(); index != m_clients.end(); ++index) {
if (!config.isCanonicalName(index->first)) {

View File

@ -436,13 +436,13 @@ private:
PrimaryClient *m_primaryClient;
// all clients (including the primary client) indexed by name
typedef std::map<String, BaseClientProxy *> ClientList;
typedef std::set<BaseClientProxy *> ClientSet;
using ClientList = std::map<String, BaseClientProxy *>;
using ClientSet = std::set<BaseClientProxy *>;
ClientList m_clients;
ClientSet m_clientSet;
// all old connections that we're waiting to hangup
typedef std::map<BaseClientProxy *, EventQueueTimer *> OldClients;
using OldClients = std::map<BaseClientProxy *, EventQueueTimer *>;
OldClients m_oldClients;
// the client with focus

View File

@ -50,6 +50,6 @@ public:
typedef ::testing::NiceMock<MockKeyState> KeyStateImpl;
typedef UInt32 KeyID;
using KeyID = UInt32;
typedef void (*ForeachKeyCallback)(KeyID, SInt32 group, deskflow::KeyMap::KeyItem &, void *userData);