blob: 84f813cc88e4a9ad24f768689047bd9b5a57f5cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
diff -durr plink-1.05-src-orig/helper.cpp plink-1.05-src/helper.cpp
--- plink-1.05-src-orig/helper.cpp 2008-12-11 20:52:22.000000000 +0000
+++ plink-1.05-src/helper.cpp 2009-03-06 23:22:06.199103558 +0000
@@ -36,7 +36,7 @@
extern ofstream LOG;
extern Plink * PP;
-
+/*
template <class T>
bool from_string(T& t,
const std::string& s,
@@ -45,7 +45,7 @@
std::istringstream iss(s);
return !(iss >> f >> t).fail();
}
-
+*/
vector<bool> nvec_bool()
{
vector<bool> t(0);
diff -durr plink-1.05-src-orig/helper.h plink-1.05-src/helper.h
--- plink-1.05-src-orig/helper.h 2008-12-11 20:52:24.000000000 +0000
+++ plink-1.05-src/helper.h 2009-03-06 23:22:06.218353426 +0000
@@ -18,6 +18,9 @@
#include <vector>
#include <cstdio>
+#include <iostream>
+#include <sstream>
+
#include "plink.h"
template<class T>
@@ -89,7 +92,13 @@
template <class T>
bool from_string(T& t,
const std::string& s,
- std::ios_base& (*f)(std::ios_base&));
+ std::ios_base& (*f)(std::ios_base&))
+{
+ std::istringstream iss(s);
+ return !(iss >> f >> t).fail();
+ }
+
+
void error(string);
void shutdown();
|