mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-24 06:21:46 +00:00
flattests_cpp17 doesn't compile with Visual Studio 2017: warning C4100: 'indent': unreferenced formal parameter (#6811)
stringify_util.h(127): error C2220: warning treated as error - no 'object' file generated stringify_util.h(127): warning C4100: 'indent': unreferenced formal parameter stringify_util.h(85): warning C4100: 'indent': unreferenced formal parameter stringify_util.h(85): warning C4100: 'fbs': unreferenced formal parameter
This commit is contained in:
@@ -83,6 +83,8 @@ std::string StringifyTableOrStructImpl(const FBS &fbs,
|
|||||||
|
|
||||||
template<typename FBS>
|
template<typename FBS>
|
||||||
std::string StringifyTableOrStruct(const FBS &fbs, const std::string &indent) {
|
std::string StringifyTableOrStruct(const FBS &fbs, const std::string &indent) {
|
||||||
|
(void)fbs;
|
||||||
|
(void)indent;
|
||||||
static constexpr size_t field_count = FBS::Traits::fields_number;
|
static constexpr size_t field_count = FBS::Traits::fields_number;
|
||||||
std::string out;
|
std::string out;
|
||||||
if constexpr (field_count > 0) {
|
if constexpr (field_count > 0) {
|
||||||
@@ -125,6 +127,7 @@ template<typename T> std::string StringifyArithmeticType(T val) {
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
std::optional<std::string> StringifyFlatbufferValue(T &&val,
|
std::optional<std::string> StringifyFlatbufferValue(T &&val,
|
||||||
const std::string &indent) {
|
const std::string &indent) {
|
||||||
|
(void)indent;
|
||||||
constexpr bool is_pointer = std::is_pointer_v<std::remove_reference_t<T>>;
|
constexpr bool is_pointer = std::is_pointer_v<std::remove_reference_t<T>>;
|
||||||
if constexpr (is_pointer) {
|
if constexpr (is_pointer) {
|
||||||
if (val == nullptr) return std::nullopt; // Field is absent.
|
if (val == nullptr) return std::nullopt; // Field is absent.
|
||||||
|
|||||||
Reference in New Issue
Block a user