From accf4b338dee50dcacc7caf5dc46e0abc5dffd89 Mon Sep 17 00:00:00 2001 From: Peter Elliott Date: Fri, 1 Oct 2021 01:00:54 -0600 Subject: [PATCH] AK: Expand to_int to to_int and to_int This change also applys to to_uint On i686 u64 == long long but on x86_64 u64 == long. Therefor on either arch, one of the instantiations is missed. This change makes sure that all integer types have an instantiation. --- AK/StringUtils.cpp | 6 ++++-- AK/StringView.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/AK/StringUtils.cpp b/AK/StringUtils.cpp index 9ad58da1566..78d49a48e23 100644 --- a/AK/StringUtils.cpp +++ b/AK/StringUtils.cpp @@ -116,7 +116,8 @@ Optional convert_to_int(const StringView& str, TrimWhitespace trim_whitespace template Optional convert_to_int(const StringView& str, TrimWhitespace); template Optional convert_to_int(const StringView& str, TrimWhitespace); template Optional convert_to_int(const StringView& str, TrimWhitespace); -template Optional convert_to_int(const StringView& str, TrimWhitespace); +template Optional convert_to_int(const StringView& str, TrimWhitespace); +template Optional convert_to_int(const StringView& str, TrimWhitespace); template Optional convert_to_uint(const StringView& str, TrimWhitespace trim_whitespace) @@ -146,7 +147,8 @@ Optional convert_to_uint(const StringView& str, TrimWhitespace trim_whitespac template Optional convert_to_uint(const StringView& str, TrimWhitespace); template Optional convert_to_uint(const StringView& str, TrimWhitespace); template Optional convert_to_uint(const StringView& str, TrimWhitespace); -template Optional convert_to_uint(const StringView& str, TrimWhitespace); +template Optional convert_to_uint(const StringView& str, TrimWhitespace); +template Optional convert_to_uint(const StringView& str, TrimWhitespace); template Optional convert_to_uint(const StringView& str, TrimWhitespace); template Optional convert_to_uint(const StringView& str, TrimWhitespace); diff --git a/AK/StringView.cpp b/AK/StringView.cpp index 83f90e2d3c2..205f282d703 100644 --- a/AK/StringView.cpp +++ b/AK/StringView.cpp @@ -215,7 +215,8 @@ Optional StringView::to_int() const template Optional StringView::to_int() const; template Optional StringView::to_int() const; template Optional StringView::to_int() const; -template Optional StringView::to_int() const; +template Optional StringView::to_int() const; +template Optional StringView::to_int() const; template Optional StringView::to_uint() const @@ -226,7 +227,8 @@ Optional StringView::to_uint() const template Optional StringView::to_uint() const; template Optional StringView::to_uint() const; template Optional StringView::to_uint() const; -template Optional StringView::to_uint() const; +template Optional StringView::to_uint() const; +template Optional StringView::to_uint() const; template Optional StringView::to_uint() const; template Optional StringView::to_uint() const;