Skip to content

Commit 18e51b7

Browse files
authored
Update to modern style cast (#143)
Signed-off-by: Ben Magistro <[email protected]>
1 parent 6ccf63b commit 18e51b7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/boost/program_options/detail/value_semantic.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ namespace boost { namespace program_options {
150150
boost::any a;
151151
std::vector<std::basic_string<charT> > cv;
152152
cv.push_back(s[i]);
153-
validate(a, cv, (T*)0, 0);
153+
validate(a, cv, static_cast<T*>(nullptr), 0);
154154
tv->push_back(boost::any_cast<T>(a));
155155
}
156156
catch(const bad_lexical_cast& /*e*/) {
@@ -169,7 +169,7 @@ namespace boost { namespace program_options {
169169
validators::check_first_occurrence(v);
170170
validators::get_single_string(s);
171171
boost::any a;
172-
validate(a, s, (T*)0, 0);
172+
validate(a, s, static_cast<T*>(nullptr), 0);
173173
v = boost::any(boost::optional<T>(boost::any_cast<T>(a)));
174174
}
175175

@@ -184,7 +184,7 @@ namespace boost { namespace program_options {
184184
validators::check_first_occurrence(v);
185185
validators::get_single_string(s);
186186
boost::any a;
187-
validate(a, s, (T*)0, 0);
187+
validate(a, s, static_cast<T*>(nullptr), 0);
188188
v = boost::any(std::optional<T>(boost::any_cast<T>(a)));
189189
}
190190
#endif
@@ -201,7 +201,7 @@ namespace boost { namespace program_options {
201201
if (new_tokens.empty() && !m_implicit_value.empty())
202202
value_store = m_implicit_value;
203203
else
204-
validate(value_store, new_tokens, (T*)0, 0);
204+
validate(value_store, new_tokens, static_cast<T*>(nullptr), 0);
205205
}
206206

207207
template<class T>

0 commit comments

Comments
 (0)