fix Codacy warning

This commit is contained in:
Qianqian Fang 2022-02-16 22:50:15 -05:00
parent 3c820dd215
commit 02d8f926f0
2 changed files with 2 additions and 2 deletions

View File

@ -1922,7 +1922,7 @@ class binary_reader
bool is_optimized = get_ubjson_size_type(size_and_type);
if (size_and_type.first != string_t::npos)
if (is_optimized && size_and_type.first != string_t::npos)
{
if (size_and_type.second != 0)
{

View File

@ -10298,7 +10298,7 @@ class binary_reader
bool is_optimized = get_ubjson_size_type(size_and_type);
if (size_and_type.first != string_t::npos)
if (is_optimized && size_and_type.first != string_t::npos)
{
if (size_and_type.second != 0)
{