diff options
Diffstat (limited to 'src/Layer.hh')
-rw-r--r-- | src/Layer.hh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Layer.hh b/src/Layer.hh index bbda950..da8f04c 100644 --- a/src/Layer.hh +++ b/src/Layer.hh | |||
@@ -25,6 +25,12 @@ | |||
25 | #include <string> | 25 | #include <string> |
26 | #include <cstdio> | 26 | #include <cstdio> |
27 | 27 | ||
28 | #ifdef HAVE_CSTRING | ||
29 | #include <cstring> | ||
30 | #else | ||
31 | #include <string.h> | ||
32 | #endif | ||
33 | |||
28 | using std::string; | 34 | using std::string; |
29 | 35 | ||
30 | /** | 36 | /** |
@@ -48,7 +54,7 @@ public: | |||
48 | 54 | ||
49 | explicit Layer(int i) : m_num(i) {}; | 55 | explicit Layer(int i) : m_num(i) {}; |
50 | 56 | ||
51 | static int getNumFromString(string &str) { | 57 | static int getNumFromString(const string &str) { |
52 | int tempnum = 0; | 58 | int tempnum = 0; |
53 | if (sscanf(str.c_str(), "%d", &tempnum) == 1) | 59 | if (sscanf(str.c_str(), "%d", &tempnum) == 1) |
54 | return tempnum; | 60 | return tempnum; |