mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 10:01:33 +08:00
Added nullptr check to append_string_view
This commit is contained in:
parent
6355e9895d
commit
a5a39c52b0
@ -24,7 +24,10 @@ template<size_t Buffer_Size>
|
|||||||
inline void append_string_view(fmt::string_view view, fmt::basic_memory_buffer<char, Buffer_Size> &dest)
|
inline void append_string_view(fmt::string_view view, fmt::basic_memory_buffer<char, Buffer_Size> &dest)
|
||||||
{
|
{
|
||||||
auto *buf_ptr = view.data();
|
auto *buf_ptr = view.data();
|
||||||
dest.append(buf_ptr, buf_ptr + view.size());
|
if(buf_ptr != nullptr)
|
||||||
|
{
|
||||||
|
dest.append(buf_ptr, buf_ptr + view.size());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, size_t Buffer_Size>
|
template<typename T, size_t Buffer_Size>
|
||||||
|
Loading…
Reference in New Issue
Block a user