From: Arnaud Giersch Date: Mon, 9 Oct 2017 21:32:05 +0000 (+0200) Subject: Remove useless #ifdef __cplusplus from hpp files. X-Git-Tag: v3.18~504^2~5 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d4dc697d017dc90d064827165eb4f924452aeb0d?hp=794555c12839e503e3fd6e101e3e82336036939e Remove useless #ifdef __cplusplus from hpp files. --- diff --git a/src/instr/instr_smpi.hpp b/src/instr/instr_smpi.hpp index e212b46e81..77951ef89d 100644 --- a/src/instr/instr_smpi.hpp +++ b/src/instr/instr_smpi.hpp @@ -6,12 +6,9 @@ #ifndef INSTR_SMPI_HPP #define INSTR_SMPI_HPP -#ifdef __cplusplus -#include -#endif - #include "smpi/smpi.h" #include "src/instr/instr_private.hpp" +#include SG_BEGIN_DECL() @@ -46,11 +43,9 @@ typedef struct smpi_trace_call_location { const char* previous_filename; int previous_linenumber; -#ifdef __cplusplus std::string get_composed_key() { return std::string(previous_filename) + ':' + std::to_string(previous_linenumber) + ':' + filename + ':' + std::to_string(linenumber); } -#endif } smpi_trace_call_location_t; diff --git a/src/mc/mc_private.hpp b/src/mc/mc_private.hpp index 64a1c9a7da..09d17dcd54 100644 --- a/src/mc/mc_private.hpp +++ b/src/mc/mc_private.hpp @@ -9,12 +9,9 @@ #include "mc/mc.h" #include "xbt/automaton.h" -#ifdef __cplusplus #include "src/mc/mc_forward.hpp" #include "src/xbt/memory_map.hpp" -#endif -#ifdef __cplusplus namespace simgrid { namespace mc { @@ -28,7 +25,6 @@ struct DerefAndCompareByActorsCountAndUsedHeap { } } -#endif SG_BEGIN_DECL() @@ -49,8 +45,6 @@ XBT_PRIVATE void MC_show_deadlock(void); SG_END_DECL() -#ifdef __cplusplus - namespace simgrid { namespace mc { @@ -67,5 +61,3 @@ extern XBT_PRIVATE xbt_automaton_t property_automaton; } #endif - -#endif diff --git a/src/mc/mc_snapshot.hpp b/src/mc/mc_snapshot.hpp index 3a86a2042c..b0a19d0523 100644 --- a/src/mc/mc_snapshot.hpp +++ b/src/mc/mc_snapshot.hpp @@ -150,8 +150,6 @@ static const void* mc_snapshot_get_heap_end(simgrid::mc::Snapshot* snapshot); } -#ifdef __cplusplus - namespace simgrid { namespace mc { @@ -161,8 +159,6 @@ XBT_PRIVATE void restore_snapshot(std::shared_ptr snapsho } } -#endif - extern "C" { XBT_PRIVATE void mc_restore_page_snapshot_region(simgrid::mc::RemoteClient* process, void* start_addr, diff --git a/src/simix/popping_private.hpp b/src/simix/popping_private.hpp index 208f6e90d4..f02bba88e8 100644 --- a/src/simix/popping_private.hpp +++ b/src/simix/popping_private.hpp @@ -70,8 +70,6 @@ XBT_PRIVATE void SIMIX_run_blocking(std::function const* code); SG_END_DECL() -#ifdef __cplusplus - /* Defines the marshal/unmarshal functions for each type of parameters. * * They will be used in popping_accessors.hpp to define the functions allowing @@ -224,8 +222,6 @@ void marshal(smx_simcall_t simcall, e_smx_simcall_t call, A const&... a) } } -#endif - #include "popping_accessors.hpp" #endif diff --git a/src/surf/trace_mgr.hpp b/src/surf/trace_mgr.hpp index 2cb74ce73a..89bfc16d96 100644 --- a/src/surf/trace_mgr.hpp +++ b/src/surf/trace_mgr.hpp @@ -38,7 +38,6 @@ XBT_PUBLIC(tmgr_trace_t) tmgr_trace_new_from_string(std::string id, std::string SG_END_DECL() -#ifdef __cplusplus namespace simgrid { /** @brief Modeling of the availability profile (due to an external load) or the churn * @@ -98,6 +97,5 @@ private: }; }} // namespace simgrid::trace_mgr -#endif /* C++ only */ #endif /* SURF_TMGR_H */