Skip to content

Commit d3dfe18

Browse files
committed
refactor: rename error_type_from_code_slow -> diag_type_from_code_slow
1 parent 06c45af commit d3dfe18

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/diag-code-list.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ parsed_diag_code_list parse_diag_code_list(
100100

101101
void compiled_diag_code_list::add(const parsed_diag_code_list& diag_code_list) {
102102
auto add_code = [this](std::string_view code, auto& code_set) -> void {
103-
std::optional<diag_type> code_error_type = error_type_from_code_slow(code);
103+
std::optional<diag_type> code_error_type = diag_type_from_code_slow(code);
104104
if (code_error_type.has_value()) {
105105
code_set[static_cast<std::size_t>(*code_error_type)] = true;
106106
} else {

src/diagnostic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ QLJS_WARNING_PUSH
178178
// is.
179179
QLJS_WARNING_IGNORE_GCC("-Wstringop-overflow")
180180

181-
std::optional<diag_type> error_type_from_code_slow(
181+
std::optional<diag_type> diag_type_from_code_slow(
182182
std::string_view code) noexcept {
183183
for (int i = 0; i < diag_type_count; ++i) {
184184
// TODO(strager): Parse the incoming code instead of stringifying each code

src/quick-lint-js/diagnostic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ struct diagnostic_info {
9090
};
9191

9292
const diagnostic_info &get_diagnostic_info(diag_type) noexcept;
93-
std::optional<diag_type> error_type_from_code_slow(
93+
std::optional<diag_type> diag_type_from_code_slow(
9494
std::string_view code) noexcept;
9595
}
9696

0 commit comments

Comments
 (0)