libsaria: Remove redundant code

Nothing needs to call this function anymore.  I also cleaned up the
header file a bit.
This commit is contained in:
Bryan Schumaker 2011-12-29 22:08:53 -05:00
parent bdf359e008
commit 180707a6c2
4 changed files with 7 additions and 28 deletions

View File

@ -5,6 +5,7 @@
#include <libsaria/idle.h>
#include <libsaria/library.h>
#include "path/path.h"
#include "list/list.h"
#include "library.h"
static void do_load()

View File

@ -13,16 +13,6 @@ list<LibraryPath> path_list;
namespace libsaria
{
LibraryPath *library::get_path(string dir)
{
list<LibraryPath>::iterator it;
for (it = path_list.begin(); it != path_list.end(); it++) {
if (it->get_path() == dir)
return &(*it);
}
return NULL;
}
void library::for_each_path(void (*info_func)(struct library::PathInfo &))
{
list<LibraryPath>::iterator it;
@ -39,7 +29,11 @@ namespace libsaria
void library::update_path(string dir)
{
get_path(dir)->update();
list<LibraryPath>::iterator it;
for (it == path_list.begin(); it != path_list.end(); it++) {
if (it->get_path() == dir)
(*it).update();
}
}
void library::refresh()

View File

@ -2,26 +2,9 @@
#define LIBSARIA_LIBRARY_SOURCE_H
#include <list>
#include <string>
using namespace std;
#include <libsaria/track.h>
#include <libsaria/library.h>
#include <libsaria/model.h>
#include <libsaria/path.h>
#include "path/path.h"
#include "list/list.h"
extern list<LibraryPath> path_list;
namespace libsaria
{
namespace library
{
list<LibraryPath> *get_path_list();
LibraryPath *get_path(string);
}
}
#endif /* LIBSARIA_LIBRARY_SOURCE_H */

View File

@ -1,6 +1,7 @@
#include <libsaria/index.h>
#include "../library.h"
#include "../list/list.h"
#include "path.h"
void LibraryPath::load_file(InFile &in, string dir)