[Genabel-commits] r1394 - pkg/ProbABEL/src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Nov 18 23:31:03 CET 2013
Author: lckarssen
Date: 2013-11-18 23:31:03 +0100 (Mon, 18 Nov 2013)
New Revision: 1394
Modified:
pkg/ProbABEL/src/command_line_settings.cpp
pkg/ProbABEL/src/command_line_settings.h
pkg/ProbABEL/src/data.cpp
pkg/ProbABEL/src/eigen_mematrix.h
pkg/ProbABEL/src/extract-snp.cpp
pkg/ProbABEL/src/phedata.cpp
pkg/ProbABEL/src/usage.cpp
Log:
Remove another set of violations of the Google style guide based on Jenkins. Here I removed 'using namespace std' from the code, since this loads the whole namespace. Instead, it is better to only load the functions you need. In our case this is mostly std::cout, std::cerr, std::endl and sometimes std::string.
Modified: pkg/ProbABEL/src/command_line_settings.cpp
===================================================================
--- pkg/ProbABEL/src/command_line_settings.cpp 2013-11-18 20:59:21 UTC (rev 1393)
+++ pkg/ProbABEL/src/command_line_settings.cpp 2013-11-18 22:31:03 UTC (rev 1394)
@@ -20,7 +20,9 @@
#endif
#include "fvlib/FileVector.h"
-using namespace std;
+using std::cout;
+using std::cerr;
+using std::endl;
string cmdvars::getStrGenfilename() const
{
Modified: pkg/ProbABEL/src/command_line_settings.h
===================================================================
--- pkg/ProbABEL/src/command_line_settings.h 2013-11-18 20:59:21 UTC (rev 1393)
+++ pkg/ProbABEL/src/command_line_settings.h 2013-11-18 22:31:03 UTC (rev 1394)
@@ -9,7 +9,7 @@
#define COMMAND_LINE_SETTINGS_H_
#include <string>
-using namespace std;
+using std::string;
class cmdvars
{
Modified: pkg/ProbABEL/src/data.cpp
===================================================================
--- pkg/ProbABEL/src/data.cpp 2013-11-18 20:59:21 UTC (rev 1393)
+++ pkg/ProbABEL/src/data.cpp 2013-11-18 22:31:03 UTC (rev 1394)
@@ -24,7 +24,6 @@
#endif
#include "utilities.h"
-using namespace std;
unsigned int Nmeasured(char * fname, int nphenocols, int npeople)
{
Modified: pkg/ProbABEL/src/eigen_mematrix.h
===================================================================
--- pkg/ProbABEL/src/eigen_mematrix.h 2013-11-18 20:59:21 UTC (rev 1393)
+++ pkg/ProbABEL/src/eigen_mematrix.h 2013-11-18 22:31:03 UTC (rev 1394)
@@ -5,8 +5,10 @@
#include <iostream>
using namespace Eigen;
-using namespace std;
+using std::cout;
+using std::cerr;
+
template<class DT> class mematrix {
public:
int nrow;
Modified: pkg/ProbABEL/src/extract-snp.cpp
===================================================================
--- pkg/ProbABEL/src/extract-snp.cpp 2013-11-18 20:59:21 UTC (rev 1393)
+++ pkg/ProbABEL/src/extract-snp.cpp 2013-11-18 22:31:03 UTC (rev 1394)
@@ -27,7 +27,9 @@
#include <fstream>
#include <map>
-using namespace std;
+using std::cout;
+using std::cerr;
+using std::endl;
#include "fvlib/Logger.h"
#include "fvlib/FileVector.h"
Modified: pkg/ProbABEL/src/phedata.cpp
===================================================================
--- pkg/ProbABEL/src/phedata.cpp 2013-11-18 20:59:21 UTC (rev 1393)
+++ pkg/ProbABEL/src/phedata.cpp 2013-11-18 22:31:03 UTC (rev 1394)
@@ -5,6 +5,11 @@
#include <cstdlib>
#include <phedata.h>
+using std::cout;
+using std::cerr;
+using std::endl;
+
+
phedata::phedata(char * fname, int noutc, int npeople, int interaction,
bool iscox)
{
Modified: pkg/ProbABEL/src/usage.cpp
===================================================================
--- pkg/ProbABEL/src/usage.cpp 2013-11-18 20:59:21 UTC (rev 1393)
+++ pkg/ProbABEL/src/usage.cpp 2013-11-18 22:31:03 UTC (rev 1394)
@@ -13,8 +13,10 @@
#endif
-using namespace std;
+using std::cout;
+using std::endl;
+
void print_usage(char * program_name, int exit_code)
{
cout << "\nUsage: " << program_name << " options" << endl;
More information about the Genabel-commits
mailing list