summaryrefslogtreecommitdiff
path: root/ptfformat.h
diff options
context:
space:
mode:
Diffstat (limited to 'ptfformat.h')
-rw-r--r--ptfformat.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/ptfformat.h b/ptfformat.h
index a4d5685..d57e8b1 100644
--- a/ptfformat.h
+++ b/ptfformat.h
@@ -38,7 +38,8 @@ public:
int64_t length;
bool operator ==(const struct wav& other) {
- return (this->index == other.index);
+ return (this->filename != std::string("") &&
+ this->index == other.index);
}
} wav_t;
@@ -63,7 +64,7 @@ public:
region_t reg;
bool operator ==(const struct track& other) {
- return (this->index == other.index);
+ return (this->name == other.name);
}
} track_t;
@@ -71,14 +72,14 @@ public:
std::vector<region_t> regions;
std::vector<track_t> tracks;
- static bool trackexistsin(std::vector<track_t> tr, uint16_t index) {
+ static bool trackexistsin(std::vector<track_t> tr, std::string name) {
std::vector<track_t>::iterator begin = tr.begin();
std::vector<track_t>::iterator finish = tr.end();
std::vector<track_t>::iterator found;
wav_t w = { std::string(""), 0, 0, 0 };
region_t r = { std::string(""), 0, 0, 0, 0, w };
- track_t f = { std::string(""), index, 0, r };
+ track_t f = { name, 0, 0, r };
if ((found = std::find(begin, finish, f)) != finish) {
return true;