Skip to content

Commit 8736c1b

Browse files
committed
replace template with auto
A little simpler. Signed-off-by: Rosen Penev <[email protected]>
1 parent a1afc71 commit 8736c1b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/types.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,7 @@ std::ostream& operator<<(std::ostream& os, const Rational& r) {
211211
return os << r.first << "/" << r.second;
212212
}
213213

214-
template <typename T>
215-
static std::istream& fromStreamToRational(std::istream& is, T& r) {
214+
static std::istream& fromStreamToRational(std::istream& is, auto& r) {
216215
// http://dev.exiv2.org/boards/3/topics/1912?r=1915
217216
if (std::tolower(is.peek()) == 'f') {
218217
char F = 0;

src/utils.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66

77
namespace Exiv2::Internal {
88

9-
template <typename T>
10-
constexpr bool contains(std::string_view s, T c) {
9+
constexpr bool contains(std::string_view s, auto c) {
1110
#ifdef __cpp_lib_string_contains
1211
return s.contains(c);
1312
#else

0 commit comments

Comments
 (0)