Skip to content

Commit

Permalink
- fixed std::shared_ptr and boost::shared_ptr mixing
Browse files Browse the repository at this point in the history
- fixed undefined reference to return value in WriteOutputVar
  • Loading branch information
Marcus Walther committed Oct 15, 2015
1 parent b3391fe commit cc63c1f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions Compiler/Template/CodegenCpp.tpl
Expand Up @@ -6028,9 +6028,9 @@ case SIMCODE(modelInfo = MODELINFO(__),makefileParams = MAKEFILE_PARAMS(__)) th
else
<<
#if defined(__vxworks)
_reader = boost::shared_ptr<IPropertyReader>(new XmlPropertyReader("/SYSTEM/bundles/com.boschrexroth.<%modelname%>/OMCpp<%fileNamePrefix%>Init.xml"));
_reader = shared_ptr<IPropertyReader>(new XmlPropertyReader("/SYSTEM/bundles/com.boschrexroth.<%modelname%>/OMCpp<%fileNamePrefix%>Init.xml"));
#else
_reader = boost::shared_ptr<IPropertyReader>(new XmlPropertyReader("<%makefileParams.compileDir%>/OMCpp<%fileNamePrefix%>Init.xml"));
_reader = shared_ptr<IPropertyReader>(new XmlPropertyReader("<%makefileParams.compileDir%>/OMCpp<%fileNamePrefix%>Init.xml"));
#endif
_reader->readInitialValues(*this, _sim_vars);

Expand Down Expand Up @@ -7352,8 +7352,8 @@ match modelInfo
<%conditionvariables%>
Functions* _functions;

boost::shared_ptr<IPropertyReader> _reader;
boost::shared_ptr<IAlgLoopSolverFactory> _algLoopSolverFactory; ///< Factory that provides an appropriate solver
shared_ptr<IPropertyReader> _reader;
shared_ptr<IAlgLoopSolverFactory> _algLoopSolverFactory; ///< Factory that provides an appropriate solver

<%algloopsolver%>
<%jacalgloopsolver%>
Expand Down
Expand Up @@ -12,7 +12,7 @@ class IPropertyReader
virtual ~IPropertyReader() {}


virtual void readInitialValues(IContinuous& system, boost::shared_ptr<ISimVars> sim_vars) = 0;
virtual void readInitialValues(IContinuous& system, shared_ptr<ISimVars> sim_vars) = 0;
virtual std::string getPropertyFile()= 0;
virtual void setPropertyFile(std::string file)= 0;
virtual const output_int_vars_t& getIntOutVars() = 0;
Expand Down
Expand Up @@ -33,7 +33,7 @@ struct WriteOutputVar
@param val pointer to output variable
@param negate if output variable is a negate alias variable
*/
const double& operator()(const T* val,const T& negate)
const double operator()(const T* val,const T& negate)
{
//if output variable negate alias variable, then negate output value
if(negate)
Expand Down Expand Up @@ -843,4 +843,4 @@ class MatFileWriter : public Writer
int *_intMatrix;
vector<string> _var_outputs;
};
/** @} */ // end of dataexchangePolicies
/** @} */ // end of dataexchangePolicies
10 changes: 5 additions & 5 deletions SimulationRuntime/cpp/Include/Core/Solver/SystemStateSelection.h
Expand Up @@ -25,12 +25,12 @@ class BOOST_EXTENSION_STATESELECT_DECL SystemStateSelection

IMixedSystem* _system;
IStateSelection* _state_selection;
std::vector<boost::shared_array<int> > _rowPivot;
std::vector<boost::shared_array<int> > _colPivot;
vector<boost::shared_array<int> > _rowPivot;
vector<boost::shared_array<int> > _colPivot;
unsigned int _dimStateSets;
std::vector<unsigned int> _dimStates;
std::vector<unsigned int> _dimDummyStates;
std::vector<unsigned int> _dimStateCanditates;
vector<unsigned int> _dimStates;
vector<unsigned int> _dimDummyStates;
vector<unsigned int> _dimStateCanditates;
bool _initialized;

};
Expand Down

0 comments on commit cc63c1f

Please sign in to comment.