Skip to content

Commit 51a2eab

Browse files
committed
refactor: declare typedef only once
1 parent c537963 commit 51a2eab

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/ada/url_search_params.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ struct url_search_params {
6868
std::string to_string();
6969

7070
private:
71-
std::vector<std::pair<std::string, std::string>> params{};
71+
typedef std::pair<std::string, std::string> key_value_pair;
72+
std::vector<key_value_pair> params{};
7273
}; // url_search_params
7374

7475
} // namespace ada

src/url_search_params.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ void url_search_params::remove(const std::string_view key,
2626
}
2727

2828
void url_search_params::sort() {
29-
typedef std::pair<std::string, std::string> key_value_pair;
3029
std::stable_sort(params.begin(), params.end(),
3130
[](const key_value_pair &lhs, const key_value_pair &rhs) {
3231
return lhs.first < rhs.first;

0 commit comments

Comments
 (0)