Skip to content

Commit

Permalink
-changed input parameter in division from std::string to const char*
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@21977 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
RuedKamp committed Aug 25, 2014
1 parent 3838fcc commit 7d063df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SimulationRuntime/cpp/Core/Math/Functions.cpp
Expand Up @@ -24,14 +24,14 @@
#define min(a,b) ((a > b) ? (b) : (a))
#endif

double division (const double &a,const double &b,std::string text)
double division (const double &a,const double &b, const char* text)
{
if(b != 0)
return a/b ;
else
{
std::string error_msg = "Division by zeror: ";
throw std::invalid_argument(error_msg+text);
throw std::invalid_argument(error_msg+string(text));
}
}

Expand Down

0 comments on commit 7d063df

Please sign in to comment.