[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r3919 - trunk/pingus/src
From: |
grumbel at BerliOS |
Subject: |
[Pingus-CVS] r3919 - trunk/pingus/src |
Date: |
Sun, 27 Jul 2008 18:59:10 +0200 |
Author: grumbel
Date: 2008-07-27 18:59:05 +0200 (Sun, 27 Jul 2008)
New Revision: 3919
Modified:
trunk/pingus/src/system.cpp
trunk/pingus/src/system.hpp
Log:
Unused functions removed
Modified: trunk/pingus/src/system.cpp
===================================================================
--- trunk/pingus/src/system.cpp 2008-07-27 16:58:32 UTC (rev 3918)
+++ trunk/pingus/src/system.cpp 2008-07-27 16:59:05 UTC (rev 3919)
@@ -161,42 +161,6 @@
return filename.substr(0, i);
}
-std::string
-System::cut_ext (std::string filename)
-{
- std::string::size_type idx = filename.find_last_of('.');
- if (idx != std::string::npos)
- {
- std::cout << "CutExt: " << filename << " -> " << filename.substr(0, idx)
<< std::endl;
- return filename.substr(0, idx);
- }
- else
- {
- return filename;
- }
-}
-
-std::string
-System::extension (std::string filename)
-{
- const char* str = filename.c_str ();
- int i;
- int last_char = (int)filename.size() - 1;
-
- for(i = last_char; i >= 0; --i)
- {
- if (str[i] == '.' ) {
- if (i != last_char)
- return filename.substr (i+1);
- else
- return "";
- } else if (str[i] == '/' ) {
- return "";
- }
- }
- return "";
-}
-
bool
System::exist(std::string filename)
{
Modified: trunk/pingus/src/system.hpp
===================================================================
--- trunk/pingus/src/system.hpp 2008-07-27 16:58:32 UTC (rev 3918)
+++ trunk/pingus/src/system.hpp 2008-07-27 16:59:05 UTC (rev 3919)
@@ -77,15 +77,6 @@
@param filename The complete filename */
static std::string dirname(std::string filename);
- /** Return the extension of the given filename:
-
- System::extension ("foobar.jpg") => "jpg"
- System::extension ("/bla/bla.blub/") => ""
- System::extension ("/bla/blabl") => ""
- */
- static std::string extension (std::string filename);
- static std::string cut_ext (std::string filename);
-
static std::string find_userdir();
/** Sets the directory to save users data to */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r3919 - trunk/pingus/src,
grumbel at BerliOS <=