Commit d44309fa authored by Aaron Bray's avatar Aaron Bray
Browse files

Bug fix for CPR, Macro to disable warnings protobuf dumps while in MSVC

parent 9326eab3
......@@ -20,6 +20,32 @@ inline size_t _Hash_value(_InIt _Begin, _InIt _End)
return (_Val);
}
/* The following warnings have been disabled while building the protobuf libraries and compiler. You may have to disable some of them in your own project as well, or live with them.
C4018 - 'expression' : signed/unsigned mismatch
C4146 - unary minus operator applied to unsigned type, result still unsigned
C4244 - Conversion from 'type1' to 'type2', possible loss of data.
C4251 - 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
C4267 - Conversion from 'size_t' to 'type', possible loss of data.
C4305 - 'identifier' : truncation from 'type1' to 'type2'
C4355 - 'this' : used in base member initializer list
C4800 - 'type' : forcing value to bool 'true' or 'false' (performance warning)
C4996 - 'function': was declared deprecated
*/
#if defined(_MSC_VER)
#define PROTO_PUSH \
__pragma(warning(push)) \
__pragma(warning(disable:4018 4146 4244 4251 4267 4305 4800 4996))
#else
#define PROTO_PUSH
#endif
#if defined(_MSC_VER)
#define PROTO_POP __pragma(warning(pop))
#else
#define PROTO_POP
#endif
#define DEFINE_STATIC_STRING(name) static constexpr char const* name = #name;
#define DEFINE_STATIC_STRING_EX(name,value) static constexpr char const* name = #value;
......
......@@ -5,7 +5,9 @@
#include "circuit/electrical/SEElectricalCircuit.h"
#include "circuit/fluid/SEFluidCircuit.h"
#include "circuit/thermal/SEThermalCircuit.h"
PROTO_PUSH
#include "bind/cdm/Circuit.pb.h"
PROTO_POP
#define CIRCUIT_LEDGER_TEMPLATE typename NodeType, typename PathType, typename CircuitType
......
......@@ -2,7 +2,9 @@
See accompanying NOTICE file for details.*/
#pragma once
PROTO_PUSH
#include "bind/cdm/Circuit.pb.h"
PROTO_POP
#define CIRCUIT_NODE_TEMPLATE typename PotentialScalar, typename QuantityScalar
#define CIRCUIT_NODE_TYPES PotentialScalar,QuantityScalar
......
......@@ -8,7 +8,9 @@ class SEThermalCompartment;
class SETissueCompartment;
class SESubstance;
class SECircuitManager;
PROTO_PUSH
#include "bind/cdm/Compartment.pb.h"
PROTO_POP
class CDM_DECL SECompartment : public Loggable
{
......
......@@ -3,7 +3,9 @@
#pragma once
class SECircuitManager;
PROTO_PUSH
#include "bind/cdm/Compartment.pb.h"
PROTO_POP
class CDM_DECL SECompartmentLink : public Loggable
{
......
......@@ -9,7 +9,9 @@
#include "compartment/thermal/SEThermalCompartment.h"
#include "compartment/thermal/SEThermalCompartmentLink.h"
#include "compartment/tissue/SETissueCompartment.h"
PROTO_PUSH
#include "bind/cdm/Compartment.pb.h"
PROTO_POP
class CDM_DECL SECompartmentManager : public Loggable
{
......
......@@ -3,7 +3,10 @@
#pragma once
#include "substance/SESubstance.h"
#include "bind/cdm/SubstanceQuantity.pb.h"
//#include "bind/cdm/SubstanceQuantity.pb.h"
PROTO_PUSH
#include "bind/cdm/SubstanceQuantity.pb.h"
PROTO_POP
class CDM_DECL SESubstanceQuantity : public Loggable
{
......
......@@ -4,7 +4,9 @@
#include "stdafx.h"
#include "engine/SEAutoSerialization.h"
#include "properties/SEScalarTime.h"
PROTO_PUSH
#include "bind/cdm/Engine.pb.h"
PROTO_POP
SEAutoSerialization::SEAutoSerialization(Logger* logger) : Loggable(logger)
{
......
......@@ -8,7 +8,9 @@
#include "scenario/SECondition.h"
#include "utils/TimingProfile.h"
#include <google/protobuf/text_format.h>
PROTO_PUSH
#include "bind/cdm/Engine.pb.h"
PROTO_POP
SEDynamicStabilization::SEDynamicStabilization(Logger *logger) : SEEngineStabilization(logger),
......
......@@ -3,7 +3,9 @@
#include "stdafx.h"
#include "engine/SEDynamicStabilizationEngineConvergence.h"
PROTO_PUSH
#include "bind/cdm/Engine.pb.h"
PROTO_POP
SEDynamicStabilizationEngineConvergence::SEDynamicStabilizationEngineConvergence(Logger *logger) : Loggable(logger), m_DataRequestMgr(logger)
{
......
......@@ -6,7 +6,9 @@ class SECondition;
class SEEngineTrack;
class PhysiologyEngine;
class SEEngineConfiguration;
PROTO_PUSH
#include "bind/cdm/Properties.pb.h"
PROTO_POP
class CDM_DECL SEEngineStabilization : public Loggable
{
......
......@@ -8,7 +8,9 @@
#include "scenario/SECondition.h"
#include "utils/TimingProfile.h"
#include <google/protobuf/text_format.h>
PROTO_PUSH
#include "bind/cdm/Engine.pb.h"
PROTO_POP
bool SETimedStabilization::StabilizeRestingState(PhysiologyEngine& engine)
{
......
......@@ -2,7 +2,9 @@
See accompanying NOTICE file for details.*/
#pragma once
PROTO_PUSH
#include "bind/cdm/PatientNutrition.pb.h"
PROTO_POP
class CDM_DECL SENutrition : public Loggable
{
......
......@@ -4,7 +4,9 @@
#pragma once
class SEEventHandler;
class SENutrition;
PROTO_PUSH
#include "bind/cdm/Patient.pb.h"
PROTO_POP
class CDM_DECL SEPatient : public Loggable
{
......
......@@ -3,7 +3,9 @@
#pragma once
#include "scenario/SEAction.h"
PROTO_PUSH
#include "bind/cdm/PatientActions.pb.h"
PROTO_POP
class CDM_DECL SEPatientAction : public SEAction
{
......
......@@ -2,7 +2,9 @@
See accompanying NOTICE file for details.*/
#pragma once
PROTO_PUSH
#include "bind/cdm/PatientAssessments.pb.h"
PROTO_POP
/**
* @brief
......
......@@ -3,7 +3,9 @@
#pragma once
#include "scenario/SECondition.h"
PROTO_PUSH
#include "bind/cdm/PatientConditions.pb.h"
PROTO_POP
class CDM_DECL SEPatientCondition : public SECondition
{
......
......@@ -2,7 +2,9 @@
See accompanying NOTICE file for details.*/
#pragma once
PROTO_PUSH
#include "bind/cdm/Properties.pb.h"
PROTO_PUSH
class CDM_DECL SEDecimalFormat
{
......
......@@ -4,7 +4,6 @@
#pragma once
#include "properties/SEProperty.h"
#include "utils/unitconversion/UCCommon.h"
#include "bind/cdm/Properties.pb.h"
class CDM_DECL SEFunction : public SEProperty
{
......
......@@ -4,7 +4,6 @@
#pragma once
#include "properties/SEProperty.h"
#include "utils/unitconversion/UCCommon.h"
#include "bind/cdm/Properties.pb.h"
class CDM_DECL SEHistogram : public SEProperty
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment