Commit 0b7d0cc1 authored by Mark Friedrichs's avatar Mark Friedrichs
Browse files

Cosmetic changes for most files

Fixed setting of runtime in BrookPlatform() constructor (constructor w/o args):
if 'brt_runtime' env variable not set, then
internal 'runtime' variable was NULL -- this led to a fault when _setBrookRuntime() was called
parent c3e1acf8
......@@ -219,6 +219,12 @@ BrookPlatform::BrookPlatform( ){
char* runtime = getenv( "brt_runtime" );
#endif
// if environment variable brt_runtime not set, default to cal
if( runtime == NULL ){
runtime = _strdup( "cal" );
}
_initializeKernelFactory( );
_setBrookRuntime( runtime );
......
......@@ -53,9 +53,9 @@ BrookVerletDynamics::BrookVerletDynamics( ){
//static const std::string methodName = "BrookVerletDynamics::BrookVerletDynamics";
BrookOpenMMFloat zero = (BrookOpenMMFloat) 0.0;
BrookOpenMMFloat one = (BrookOpenMMFloat) 1.0;
BrookOpenMMFloat oneMinus = (BrookOpenMMFloat) -1.0;
BrookOpenMMFloat zero = static_cast<BrookOpenMMFloat>( 0.0 );
BrookOpenMMFloat one = static_cast<BrookOpenMMFloat>( 1.0 );
BrookOpenMMFloat oneMinus = static_cast<BrookOpenMMFloat>( -1.0 );
// ---------------------------------------------------------------------------------------
......
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