[clang-tidy] use using instead of typedef

Found with modernize-use-using

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2020-02-20 22:17:42 -08:00 committed by Fabian Homborg
parent dd704ae30c
commit aae9ebfbd4
3 changed files with 3 additions and 3 deletions

View File

@ -325,7 +325,7 @@ class completer_t {
/// Table of completions conditions that have already been tested and the corresponding test
/// results.
typedef std::unordered_map<wcstring, bool> condition_cache_t;
using condition_cache_t = std::unordered_map<wcstring, bool>;
condition_cache_t condition_cache;
enum complete_type_t { COMPLETE_DEFAULT, COMPLETE_AUTOSUGGEST };

View File

@ -169,7 +169,7 @@ static highlight_role_t get_fallback(highlight_role_t role) {
/// Returns:
/// false: the filesystem is not case insensitive
/// true: the file system is case insensitive
typedef std::unordered_map<wcstring, bool> case_sensitivity_cache_t;
using case_sensitivity_cache_t = std::unordered_map<wcstring, bool>;
bool fs_is_case_insensitive(const wcstring &path, int fd,
case_sensitivity_cache_t &case_sensitivity_cache) {
bool result = false;

View File

@ -460,7 +460,7 @@ static wcstring truncate_command(const wcstring &cmd) {
}
/// Format information about job status for the user to look at.
typedef enum { JOB_STOPPED, JOB_ENDED } job_status_t;
using job_status_t = enum { JOB_STOPPED, JOB_ENDED };
static void print_job_status(const job_t *j, job_status_t status) {
const wchar_t *msg = L"Job %d, '%ls' has ended"; // this is the most common status msg
if (status == JOB_STOPPED) msg = L"Job %d, '%ls' has stopped";