summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/cdutils.h16
-rw-r--r--lib/cdutils.cpp16
2 files changed, 16 insertions, 16 deletions
diff --git a/includes/cdutils.h b/includes/cdutils.h
index c3053a6..3666491 100644
--- a/includes/cdutils.h
+++ b/includes/cdutils.h
@@ -79,7 +79,7 @@ class cdutils : public Base {
struct DirEntry * rootDir;
- Handle * open_ppf(String ppf, String comment) throw(GeneralException);
+ Handle * open_ppf(const String & ppf, const String & comment) throw(GeneralException);
void close_ppf() throw(GeneralException);
void set_iso_w(Handle *);
static Uint16 swap_word(Uint16 i);
@@ -105,15 +105,15 @@ class cdutils : public Base {
int show_iso_infos();
int get_pt_infos();
int show_pt_infos();
- struct DirEntry find_path(String path);
- struct DirEntry find_parent(String path);
- struct DirEntry * find_path(Byte ** buffer, String path);
- struct DirEntry * find_parent(Byte ** buffer, String path);
+ struct DirEntry find_path(const String & path);
+ struct DirEntry find_parent(const String & path);
+ struct DirEntry * find_path(Byte ** buffer, const String & path);
+ struct DirEntry * find_parent(Byte ** buffer, const String & path);
void show_head_entry(void);
int show_entry(struct DirEntry * dir);
int show_dir(struct DirEntry * dir);
- struct DirEntry find_dir_entry(struct DirEntry * dir, String name);
- struct DirEntry * find_dir_entry(Byte ** buffer, struct DirEntry * dir, String name);
+ struct DirEntry find_dir_entry(struct DirEntry * dir, const String & name);
+ struct DirEntry * find_dir_entry(Byte ** buffer, struct DirEntry * dir, const String & name);
static Uint8 from_BCD(Uint8 x);
static Uint8 to_BCD(Uint8 x);
static bool is_valid_BCD(Uint8 x);
@@ -123,7 +123,7 @@ class cdutils : public Base {
static void to_MSF(int sect, Uint8 & m, Uint8 & s, Uint8 & f, Uint32 start = 150);
private:
void write_ppf(Byte * old_sec, Byte * new_sec, int sec_num);
- String format_date(String input);
+ String format_date(const String & input);
yazedc yazedc_o;
Handle * f_iso_r, * f_iso_w, * ppf_file;
diff --git a/lib/cdutils.cpp b/lib/cdutils.cpp
index bcb976c..673ec8d 100644
--- a/lib/cdutils.cpp
+++ b/lib/cdutils.cpp
@@ -85,7 +85,7 @@ Uint32 cdutils::to_MSF(int sect, Uint32 start) {
return f | (s << 8) | (m << 16);
}
-Handle * cdutils::open_ppf(String ppf, String comment) throw (GeneralException) {
+Handle * cdutils::open_ppf(const String & ppf, const String & comment) throw (GeneralException) {
int i, l;
if (ppf_file)
@@ -151,7 +151,7 @@ void cdutils::set_iso_w(Handle * w) {
f_iso_w = w;
}
-String cdutils::format_date(String input) {
+String cdutils::format_date(const String & input) {
String output;
output = input.extract(6, 7) + '/';
@@ -508,7 +508,7 @@ int cdutils::show_dir(struct DirEntry * dir) {
return 1;
}
-struct cdutils::DirEntry cdutils::find_dir_entry(struct DirEntry * dir, String name) {
+struct cdutils::DirEntry cdutils::find_dir_entry(struct DirEntry * dir, const String & name) {
unsigned int ptr, size;
Uint8 * buffer;
struct DirEntry r = {0, 0, 0, 0, 0};
@@ -541,7 +541,7 @@ struct cdutils::DirEntry cdutils::find_dir_entry(struct DirEntry * dir, String n
return r;
}
-struct cdutils::DirEntry * cdutils::find_dir_entry(Byte ** bufout, struct cdutils::DirEntry * dir, String name) {
+struct cdutils::DirEntry * cdutils::find_dir_entry(Byte ** bufout, struct cdutils::DirEntry * dir, const String & name) {
unsigned int ptr, size;
Byte * buffer;
struct DirEntry * rdir = 0;
@@ -741,7 +741,7 @@ int cdutils::show_pt_infos() {
return 1;
}
-struct cdutils::DirEntry cdutils::find_path(String path) {
+struct cdutils::DirEntry cdutils::find_path(const String & path) {
char * newpath = path.strdup();
char ** pts = split(newpath, '/');
struct DirEntry dir = {0, 0, 0, 0, 0};
@@ -775,7 +775,7 @@ struct cdutils::DirEntry cdutils::find_path(String path) {
return dir;
}
-struct cdutils::DirEntry cdutils::find_parent(String path) {
+struct cdutils::DirEntry cdutils::find_parent(const String & path) {
char * newpath = path.strdup();
char ** pts, * p;
struct DirEntry dir = {0, 0, 0, 0, 0};
@@ -818,7 +818,7 @@ struct cdutils::DirEntry cdutils::find_parent(String path) {
return dir;
}
-struct cdutils::DirEntry * cdutils::find_path(Byte ** bufout, String path) {
+struct cdutils::DirEntry * cdutils::find_path(Byte ** bufout, const String & path) {
char * newpath = path.strdup();
char ** pts = split(newpath, '/');
struct DirEntry * dir;
@@ -859,7 +859,7 @@ struct cdutils::DirEntry * cdutils::find_path(Byte ** bufout, String path) {
return dir;
}
-struct cdutils::DirEntry * cdutils::find_parent(Byte ** bufout, String path) {
+struct cdutils::DirEntry * cdutils::find_parent(Byte ** bufout, const String & path) {
char * newpath = path.strdup();
char ** pts, * p;
struct DirEntry * dir;