Skip to content

Commit

Permalink
cleanup(sinsp): remove unused copy of PLUGIN_STATETYPE_SWITCH
Browse files Browse the repository at this point in the history
Signed-off-by: Grzegorz Nosek <[email protected]>
  • Loading branch information
gnosek committed Dec 9, 2024
1 parent 7da416e commit 702c074
Showing 1 changed file with 0 additions and 42 deletions.
42 changes: 0 additions & 42 deletions userspace/libsinsp/plugin_table_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,48 +29,6 @@ limitations under the License.
} \
}

#define __PLUGIN_STATETYPE_SWITCH(_kt) \
{ \
switch(_kt) { \
case ss_plugin_state_type::SS_PLUGIN_ST_INT8: \
_X(int8_t, s8); \
break; \
case ss_plugin_state_type::SS_PLUGIN_ST_INT16: \
_X(int16_t, s16); \
break; \
case ss_plugin_state_type::SS_PLUGIN_ST_INT32: \
_X(int32_t, s32); \
break; \
case ss_plugin_state_type::SS_PLUGIN_ST_INT64: \
_X(int64_t, s64); \
break; \
case ss_plugin_state_type::SS_PLUGIN_ST_UINT8: \
_X(uint8_t, u8); \
break; \
case ss_plugin_state_type::SS_PLUGIN_ST_UINT16: \
_X(uint16_t, u16); \
break; \
case ss_plugin_state_type::SS_PLUGIN_ST_UINT32: \
_X(uint32_t, u32); \
break; \
case ss_plugin_state_type::SS_PLUGIN_ST_UINT64: \
_X(uint64_t, u64); \
break; \
case ss_plugin_state_type::SS_PLUGIN_ST_STRING: \
_X(std::string, str); \
break; \
case ss_plugin_state_type::SS_PLUGIN_ST_BOOL: \
_X(bool, b); \
break; \
case ss_plugin_state_type::SS_PLUGIN_ST_TABLE: \
_X(libsinsp::state::base_table*, table); \
break; \
default: \
throw sinsp_exception("can't convert plugin state type to typeinfo: " + \
std::to_string(_kt)); \
} \
}

template<typename From, typename To>
static inline void convert_types(const From& from, To& to) {
to = from;
Expand Down

0 comments on commit 702c074

Please sign in to comment.