Skip to content

Commit 82b453c

Browse files
authored
Firestore: Remove unnecessary brace initialization in call to AlphaNum (#12281)
1 parent d02b19d commit 82b453c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Firestore/core/src/util/string_format.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class FormatArg : public absl::AlphaNum {
8080
template <typename T,
8181
typename = typename std::enable_if<std::is_same<bool, T>{}>::type>
8282
FormatArg(T bool_value, internal::FormatChoice<0>)
83-
: AlphaNum{bool_value ? "true" : "false"} {
83+
: AlphaNum(bool_value ? "true" : "false") {
8484
}
8585

8686
#if __OBJC__
@@ -91,15 +91,15 @@ class FormatArg : public absl::AlphaNum {
9191
typename T,
9292
typename = typename std::enable_if<objc::is_objc_pointer<T>{}>::type>
9393
FormatArg(T object, internal::FormatChoice<1>)
94-
: AlphaNum{MakeStringView([object description])} {
94+
: AlphaNum(MakeStringView([object description])) {
9595
}
9696

9797
/**
9898
* Creates a FormatArg from any Objective-C Class type. Objective-C Class
9999
* types are a special struct that aren't of a type derived from NSObject.
100100
*/
101101
FormatArg(Class object, internal::FormatChoice<1>)
102-
: AlphaNum{MakeStringView(NSStringFromClass(object))} {
102+
: AlphaNum(MakeStringView(NSStringFromClass(object))) {
103103
}
104104
#endif
105105

@@ -108,7 +108,7 @@ class FormatArg : public absl::AlphaNum {
108108
* handled specially to avoid ambiguity with generic pointers, which are
109109
* handled differently.
110110
*/
111-
FormatArg(std::nullptr_t, internal::FormatChoice<2>) : AlphaNum{"null"} {
111+
FormatArg(std::nullptr_t, internal::FormatChoice<2>) : AlphaNum("null") {
112112
}
113113

114114
/**
@@ -117,7 +117,7 @@ class FormatArg : public absl::AlphaNum {
117117
* handled differently.
118118
*/
119119
FormatArg(const char* string_value, internal::FormatChoice<3>)
120-
: AlphaNum{string_value == nullptr ? "null" : string_value} {
120+
: AlphaNum(string_value == nullptr ? "null" : string_value) {
121121
}
122122

123123
/**
@@ -126,7 +126,7 @@ class FormatArg : public absl::AlphaNum {
126126
*/
127127
template <typename T>
128128
FormatArg(T* pointer_value, internal::FormatChoice<4>)
129-
: AlphaNum{absl::Hex{reinterpret_cast<uintptr_t>(pointer_value)}} {
129+
: AlphaNum(absl::Hex(reinterpret_cast<uintptr_t>(pointer_value))) {
130130
}
131131

132132
/**
@@ -135,7 +135,7 @@ class FormatArg : public absl::AlphaNum {
135135
*/
136136
template <typename T>
137137
FormatArg(T&& value, internal::FormatChoice<5>)
138-
: AlphaNum{std::forward<T>(value)} {
138+
: AlphaNum(std::forward<T>(value)) {
139139
}
140140
};
141141

0 commit comments

Comments
 (0)