From d463240d8fd961d45b47ba96e0d93c37e1719da7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 21 Nov 2012 09:55:55 +1100 Subject: code cleanup: quiet warnings with gcc. (bzr r11888) --- src/svg/itos.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/svg/itos.cpp') diff --git a/src/svg/itos.cpp b/src/svg/itos.cpp index ff7ca516c..78726d068 100644 --- a/src/svg/itos.cpp +++ b/src/svg/itos.cpp @@ -18,6 +18,8 @@ #include // for string #include +#include "../io/ftos.h" /* own include */ /* note - why in different dirs? */ + using std::string; string itos(int n) -- cgit v1.2.3 From bfefb35c670cb412318efb87caa5bf89182beac0 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Wed, 10 Apr 2013 18:14:53 +0200 Subject: Removed unused (ancient!) code. (bzr r11608.1.92) --- src/svg/itos.cpp | 81 -------------------------------------------------------- 1 file changed, 81 deletions(-) delete mode 100644 src/svg/itos.cpp (limited to 'src/svg/itos.cpp') diff --git a/src/svg/itos.cpp b/src/svg/itos.cpp deleted file mode 100644 index 78726d068..000000000 --- a/src/svg/itos.cpp +++ /dev/null @@ -1,81 +0,0 @@ -///////////////////////////////////////////////////////////////////////// -// ftoa.cpp -// -// Copyright (c) 1996-2003 Bryce W. Harrington [bryce at osdl dot org] -// -//----------------------------------------------------------------------- -// License: This code may be used by anyone for any purpose -// so long as the copyright notices and this license -// statement remains attached. -//----------------------------------------------------------------------- -// -// This routine converts an integer into a string -// -///////////////////////////////////////////////////////////////////////// - -// Standard include files -#include -#include // for string -#include - -#include "../io/ftos.h" /* own include */ /* note - why in different dirs? */ - -using std::string; - -string itos(int n) -{ - int sign; - string s; - - if ((sign = n) < 0) // record sign - n = -n; // make n positive - do { // generate digits in reverse order - s += (char(n % 10) + '0'); // get next digit - } while ((n/=10) > 0); // delete it - - if (sign < 0) - s += '-'; - - reverse(s.begin(), s.end()); // This is what the code should look like - // if the string class is compatible with - // the standard C++ string class -#ifdef DUMB_OS_LIKE_WINDOWS - // In Windows, we'll use this hack... - for (int i=0, j=s.GetLength()-1; i 0); // delete it - - reverse(s.begin(), s.end()); // This is what the code should look like - // if the string class is compatible with - // the standard C++ string class -#ifdef DUMB_OS_LIKE_WINDOWS - // In Windows, we'll use this hack... - for (int i=0, j=s.GetLength()-1; i