Don't include <iostream> and "using" declarations in header files
<iostream> sucks in expensive initialization of the standard streams and isn't appropriate in a header file. Use <istream> and <ostream> instead. using declarations should never appear at global scope in a header file; source files get to decide what they want to use in their namespace.
This commit is contained in:
@@ -25,12 +25,10 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#endif
|
||||
#define SampleHistogram_h 1
|
||||
|
||||
#include <iostream>
|
||||
#include <ostream>
|
||||
#include <fstream>
|
||||
#include "SGSmplstat.hxx"
|
||||
|
||||
using namespace std;
|
||||
|
||||
extern const int SampleHistogramMinimum;
|
||||
extern const int SampleHistogramMaximum;
|
||||
|
||||
@@ -56,7 +54,7 @@ public:
|
||||
|
||||
double bucketThreshold (int i);
|
||||
int inBucket (int i);
|
||||
void printBuckets (ostream &);
|
||||
void printBuckets (std::ostream &);
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user