-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fix in cpp runtime for division, initialization of CVode
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12909 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
- Loading branch information
Showing
10 changed files
with
93 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
SimulationRuntime/cpp/Source/Math/Implementation/Functions.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
#include "stdafx.h" | ||
#include "Functions.h" | ||
#include <stdexcept> | ||
|
||
|
||
double division (const double &a,const double &b,std::string text) | ||
{ | ||
if(b != 0) | ||
return a/b ; | ||
else | ||
throw std::invalid_argument(text); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#if !defined(OMC_INTERFACE) | ||
#define OMC_INTERFACE | ||
|
||
#if (defined _MSC_VER) && _MSC_VER<1300 | ||
#pragma warning (disable : 4786) | ||
#endif | ||
|
||
#if defined( _WIN32 ) && defined( _MSC_VER ) | ||
# if defined OMC_EXPORTS | ||
# define OMC_API __declspec( dllexport ) | ||
# else | ||
# define OMC_API __declspec( dllimport ) | ||
# pragma warning( disable : 4251 ) // 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2' | ||
# endif | ||
#endif | ||
|
||
#if !defined(OMC_API) | ||
#define OMC_API | ||
#endif | ||
|
||
#endif | ||
|
||
#pragma warning( disable : 4297 ) // Issue warning 4297 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters