Skip to content

Commit c735bd0

Browse files
flexferrummartinmoene
authored andcommitted
Fix PVS Studio warning (bool -> size_t implicit conversion) (#36, thanks @flexferrum)
1 parent 985cdee commit c735bd0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/nonstd/variant.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2383,7 +2383,7 @@ struct hash< nonstd::variant<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T
23832383
case 14: return nvd::hash( 14 ) ^ nvd::hash( get<14>( v ) );
23842384
case 15: return nvd::hash( 15 ) ^ nvd::hash( get<15>( v ) );
23852385

2386-
default: return false;
2386+
default: return 0;
23872387
}
23882388
}
23892389
};

template/variant.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1921,7 +1921,7 @@ struct hash< nonstd::variant<{{TplArgsList}}> >
19211921
{% for n in range(NumParams) -%}
19221922
case {{n}}: return nvd::hash( {{n}} ) ^ nvd::hash( get<{{n}}>( v ) );
19231923
{% endfor %}
1924-
default: return false;
1924+
default: return 0;
19251925
}
19261926
}
19271927
};

0 commit comments

Comments
 (0)