|
From: Erik H. <eh...@us...> - 2015-10-26 11:50:46
|
Update of /cvsroot/jsbsim/JSBSim/utils/aeromatic++ In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv11863 Modified Files: AeroFighterJet.cpp AeroHighPerformance.cpp AeroJetTransport.cpp AeroLightGA.cpp AeroPropTransport.cpp Aircraft.cpp CMakeLists.txt types.cpp types.h Log Message: MSVC fixes Index: AeroFighterJet.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/utils/aeromatic++/AeroFighterJet.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** AeroFighterJet.cpp 21 Oct 2015 07:15:20 -0000 1.2 --- AeroFighterJet.cpp 26 Oct 2015 11:50:41 -0000 1.3 *************** *** 147,151 **** float const Fighter::_empty_weight_t[1][5] = { ! { 0.53, 0.53, 0.50, 0.50, 0.50 } }; --- 147,151 ---- float const Fighter::_empty_weight_t[1][5] = { ! { 0.53f, 0.53f, 0.50f, 0.50f, 0.50f } }; Index: AeroHighPerformance.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/utils/aeromatic++/AeroHighPerformance.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** AeroHighPerformance.cpp 21 Oct 2015 07:15:20 -0000 1.2 --- AeroHighPerformance.cpp 26 Oct 2015 11:50:41 -0000 1.3 *************** *** 150,154 **** float const Performance::_empty_weight_t[1][5] = { ! { 0.61, 0.61, 0.61, 0.61, 0.61 } }; --- 150,154 ---- float const Performance::_empty_weight_t[1][5] = { ! { 0.61f, 0.61f, 0.61f, 0.61f, 0.61f } }; Index: AeroJetTransport.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/utils/aeromatic++/AeroJetTransport.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** AeroJetTransport.cpp 21 Oct 2015 07:15:20 -0000 1.2 --- AeroJetTransport.cpp 26 Oct 2015 11:50:41 -0000 1.3 *************** *** 150,154 **** float const JetTransport::_empty_weight_t[1][5] = { ! { 0.55, 0.55, 0.55, 0.52, 0.49 } }; --- 150,154 ---- float const JetTransport::_empty_weight_t[1][5] = { ! { 0.55f, 0.55f, 0.55f, 0.52f, 0.49f } }; Index: AeroLightGA.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/utils/aeromatic++/AeroLightGA.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** AeroLightGA.cpp 21 Oct 2015 07:15:20 -0000 1.3 --- AeroLightGA.cpp 26 Oct 2015 11:50:41 -0000 1.4 *************** *** 149,153 **** float const Light::_empty_weight_t[1][5] = { ! { 0.84, 0.62, 0.61, 0.61, 0.61 } }; --- 149,153 ---- float const Light::_empty_weight_t[1][5] = { ! { 0.84f, 0.62f, 0.61f, 0.61f, 0.61f } }; Index: AeroPropTransport.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/utils/aeromatic++/AeroPropTransport.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** AeroPropTransport.cpp 18 Oct 2015 09:46:40 -0000 1.1 --- AeroPropTransport.cpp 26 Oct 2015 11:50:41 -0000 1.2 *************** *** 148,152 **** float const PropTransport::_empty_weight_t[1][5] = { ! { 0.60, 0.60, 0.60, 0.60, 0.60 } }; --- 148,152 ---- float const PropTransport::_empty_weight_t[1][5] = { ! { 0.60f, 0.60f, 0.60f, 0.60f, 0.60f } }; *************** *** 210,214 **** float const PropTransport::_Mcrit_t[1][5] = { ! { 0.70f, 0.70f, 0.70f, 0.70f, 0.70 } }; --- 210,214 ---- float const PropTransport::_Mcrit_t[1][5] = { ! { 0.70f, 0.70f, 0.70f, 0.70f, 0.70f } }; Index: Aircraft.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/utils/aeromatic++/Aircraft.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** Aircraft.cpp 25 Oct 2015 10:35:37 -0000 1.20 --- Aircraft.cpp 26 Oct 2015 11:50:41 -0000 1.21 *************** *** 24,29 **** #include <math.h> - #include <ctime> #include <locale> #include <iostream> --- 24,29 ---- #include <math.h> + #include <time.h> #include <locale> #include <iostream> *************** *** 38,42 **** { ! Aircraft::Aircraft(Aeromatic *p) : _subtype(0), _overwrite(true), --- 38,42 ---- { ! Aircraft::Aircraft(Aeromatic *p = 0) : _subtype(0), _overwrite(true), *************** *** 46,50 **** { /* general information */ ! #if defined(WIN32) std::string dir(getEnv("HOMEPATH")); #else --- 46,50 ---- { /* general information */ ! #ifdef WIN32 std::string dir(getEnv("HOMEPATH")); #else *************** *** 66,70 **** } ! Aeromatic::Aeromatic() : Aircraft(this), _atype(LIGHT), _metric(0), --- 66,70 ---- } ! Aeromatic::Aeromatic() : Aircraft(), _atype(LIGHT), _metric(0), *************** *** 123,126 **** --- 123,128 ---- _aircraft[4] = new PropTransport(this); param->add_option(_aircraft[4]->get_description()); + + Aircraft::_aircraft = this; } *************** *** 270,276 **** char str[64]; ! std::time_t t = std::time(NULL); ! // std::strftime(str, sizeof(str), "%Y-%m-%d", std::localtime(&t)); ! std::strftime(str, sizeof(str), "%d %b %Y", std::localtime(&t)); _dir = _subdir ? create_dir(_path, _name) : _path; --- 272,286 ---- char str[64]; ! time_t t; ! ! time(&t); ! #ifdef _MSC_VER ! struct tm ti; ! localtime_s(&ti, &t); ! strftime(str, sizeof(str), "%d %b %Y", &ti); ! #else ! struct tm *ti= localtime(&t); ! strftime(str, sizeof(str), "%d %b %Y", ti); ! #endif _dir = _subdir ? create_dir(_path, _name) : _path; *************** *** 305,309 **** file << " <fileheader>" << std::endl; file << " <author> Aeromatic v " << version << " </author>" << std::endl; ! file << " <filecreationdate> " << str << "</filecreationdate>" << std::endl; file << " <version>$Revision$</version>" << std::endl; file << " <description> Models a " << _name << ". </description>" << std::endl; --- 315,319 ---- file << " <fileheader>" << std::endl; file << " <author> Aeromatic v " << version << " </author>" << std::endl; ! file << " <filecreationdate> " << str << " </filecreationdate>" << std::endl; file << " <version>$Revision$</version>" << std::endl; file << " <description> Models a " << _name << ". </description>" << std::endl; *************** *** 611,615 **** char const* Aeromatic::_estimate = "enter 0 to use estimated value"; ! #if (win32) #else # include <sys/stat.h> --- 621,625 ---- char const* Aeromatic::_estimate = "enter 0 to use estimated value"; ! #ifdef WIN32 #else # include <sys/stat.h> *************** ** |