From 695c64ecce86f764758ee0169348a06677267208 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 7 Jun 2016 23:02:41 +0800 Subject: calc_distance: fix some -Werror --- mass_profile/calc_distance.cc | 6 ++--- mass_profile/calc_distance_main.cc | 52 ++++++++++++++++++++++++++++++++++++++ mass_profile/call_calc_distance.cc | 52 -------------------------------------- 3 files changed, 55 insertions(+), 55 deletions(-) create mode 100644 mass_profile/calc_distance_main.cc delete mode 100644 mass_profile/call_calc_distance.cc diff --git a/mass_profile/calc_distance.cc b/mass_profile/calc_distance.cc index 1a637d3..91f2ea3 100644 --- a/mass_profile/calc_distance.cc +++ b/mass_profile/calc_distance.cc @@ -15,9 +15,9 @@ static double cm=1; static double s=1; static double km=1000*100; static double Mpc=3.08568e+24*cm; -static double kpc=3.08568e+21*cm; -static double yr=365.*24.*3600.; -static double Gyr=1e9*yr; +//static double kpc=3.08568e+21*cm; +//static double yr=365.*24.*3600.; +//static double Gyr=1e9*yr; static double H=71.*km/s/Mpc; static const double c=299792458.*100.*cm; //const double c=3e8*100*cm; diff --git a/mass_profile/calc_distance_main.cc b/mass_profile/calc_distance_main.cc new file mode 100644 index 0000000..28bdb70 --- /dev/null +++ b/mass_profile/calc_distance_main.cc @@ -0,0 +1,52 @@ +#include "calc_distance.h" +#include +#include +#include +using namespace std; + +static double cm=1; +static double s=1; +static double km=1000*100; +static double Mpc=3.08568e+24*cm; +static double kpc=3.08568e+21*cm; +//static double yr=365.*24.*3600.; +//static double Gyr=1e9*yr; +static double H=71.*km/s/Mpc; +static const double c=299792458.*100.*cm; +//const double c=3e8*100*cm; +static const double pi=4*atan(1); +static const double omega_m=0.27; +static const double omega_l=0.73; +static const double arcsec2arc_ratio=1./60/60/180*pi; + + + + +int main(int argc,char* argv[]) +{ + if(argc<2) + { + cerr<<"Usage:"< -#include -#include -using namespace std; - -static double cm=1; -static double s=1; -static double km=1000*100; -static double Mpc=3.08568e+24*cm; -static double kpc=3.08568e+21*cm; -static double yr=365.*24.*3600.; -static double Gyr=1e9*yr; -static double H=71.*km/s/Mpc; -static const double c=299792458.*100.*cm; -//const double c=3e8*100*cm; -static const double pi=4*atan(1); -static const double omega_m=0.27; -static const double omega_l=0.73; -static const double arcsec2arc_ratio=1./60/60/180*pi; - - - - -int main(int argc,char* argv[]) -{ - if(argc<2) - { - cerr<<"Usage:"<