Replace all typedefs by usings

This is just a matter of code style, no functional change whatsoever.
This commit is contained in:
Martin Kleusberg
2019-05-03 15:06:48 +02:00
parent 40aff11086
commit 5e90d90ac6
4 changed files with 7 additions and 7 deletions

View File

@@ -27,7 +27,7 @@ template <typename T>
class RowCache
{
public:
typedef T value_type;
using value_type = T;
/// constructs an empty cache
explicit RowCache ();

View File

@@ -24,7 +24,7 @@ class RowLoader : public QThread
void run() override;
public:
typedef RowCache<std::vector<QByteArray>> Cache;
using Cache = RowCache<std::vector<QByteArray>>;
/// set up worker thread to handle row loading
explicit RowLoader (

View File

@@ -50,7 +50,7 @@ struct CSVRow
class CSVParser
{
public:
typedef std::function<bool(size_t, CSVRow)> csvRowFunction;
using csvRowFunction = std::function<bool(size_t, CSVRow)>;
CSVParser(bool trimfields = true, char fieldseparator = ',', char quotechar = '"');
~CSVParser();

View File

@@ -25,8 +25,8 @@ enum LogMessageType
kLogMsg_ErrorLog
};
typedef QMultiMap<std::string, sqlb::ObjectPtr> objectMap; // Maps from object type (table, index, view, trigger) to a pointer to the object representation
typedef QMap<std::string, objectMap> schemaMap; // Maps from the schema name (main, temp, attached schemas) to the object map for that schema
using objectMap = QMultiMap<std::string, sqlb::ObjectPtr>; // Maps from object type (table, index, view, trigger) to a pointer to the object representation
using schemaMap = QMap<std::string, objectMap>; // Maps from the schema name (main, temp, attached schemas) to the object map for that schema
int collCompare(void* pArg, int sizeA, const void* sA, int sizeB, const void* sB);
@@ -76,7 +76,7 @@ public:
// This returns the SQLite version as well as the SQLCipher if DB4S is compiled with encryption support
static void getSqliteVersion(QString& sqlite, QString& sqlcipher);
typedef std::unique_ptr<sqlite3, DatabaseReleaser> db_pointer_type;
using db_pointer_type = std::unique_ptr<sqlite3, DatabaseReleaser>;
/**
borrow exclusive address to the currently open database, until
@@ -124,7 +124,7 @@ public:
// callback is the text representation of the values, one for each
// column. The 3rd argument is a list of strings where each entry
// represents the name of corresponding result column.
typedef std::function<bool(int, QStringList, QStringList)> execCallback;
using execCallback = std::function<bool(int, QStringList, QStringList)>;
bool executeSQL(QString statement, bool dirtyDB = true, bool logsql = true, execCallback callback = nullptr);
bool executeMultiSQL(QByteArray query, bool dirty = true, bool log = false);
QByteArray querySingleValueFromDb(const QString& sql, bool log = true, ChoiceOnUse choice = Ask);