libsaria: LibraryPath()s load their own directory
It makes more sense to set this variable directly from the save file rather than read it in and pass it as an argument.
This commit is contained in:
parent
41ec0b68e0
commit
e21f0e251c
|
@ -11,7 +11,6 @@
|
|||
static void do_load()
|
||||
{
|
||||
unsigned int size;
|
||||
string dir;
|
||||
InFile in("library.lib");
|
||||
|
||||
if (!in.good())
|
||||
|
@ -19,9 +18,8 @@ static void do_load()
|
|||
in >> size;
|
||||
|
||||
for (unsigned int i = 0; i < size; i++) {
|
||||
in >> dir;
|
||||
path_list.push_back(LibraryPath());
|
||||
path_list.back().load_file(in, dir);
|
||||
path_list.back().load_file(in);
|
||||
}
|
||||
|
||||
libsaria::library::sort_list();
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
#include "../library.h"
|
||||
#include "path.h"
|
||||
|
||||
void LibraryPath::load_file(InFile &in, string dir)
|
||||
void LibraryPath::load_file(InFile &in)
|
||||
{
|
||||
unsigned int size;
|
||||
libsaria::Track *track;
|
||||
|
||||
path = dir;
|
||||
in >> path;
|
||||
in >> size;
|
||||
println("Library path dir: " + path);
|
||||
println("Library path size: %d", size);
|
||||
|
|
|
@ -20,7 +20,7 @@ class LibraryPath
|
|||
LibraryPath(string);
|
||||
~LibraryPath();
|
||||
|
||||
void load_file(InFile &, string);
|
||||
void load_file(InFile &);
|
||||
string get_path();
|
||||
void prepare_for_removal();
|
||||
void get_info(void (*)(struct libsaria::library::PathInfo &));
|
||||
|
|
Loading…
Reference in New Issue