From 253d8f6183ea6392138c88b070ba27990ddf2607 Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Tue, 25 Mar 2014 11:56:49 -0400 Subject: [PATCH] .db seed can now be train/test string instead of integer, misc .db cleanup --- openbr/plugins/gallery.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/openbr/plugins/gallery.cpp b/openbr/plugins/gallery.cpp index a57aae2..d739d74 100644 --- a/openbr/plugins/gallery.cpp +++ b/openbr/plugins/gallery.cpp @@ -687,7 +687,9 @@ class dbGallery : public Gallery if (!subset.isEmpty()) { const QStringList &words = subset.split(":"); QtUtils::checkArgsSize("Input", words, 2, 4); - seed = QtUtils::toInt(words[0]); + if (words[0] == "train") seed = 0; + else if (words[0] == "test" ) seed = 1; + else seed = QtUtils::toInt(words[0]); if (words[1].startsWith('{') && words[1].endsWith('}')) { foreach (const QString ®exp, words[1].mid(1, words[1].size()-2).split(",")) metadataFields.append(QRegExp(regexp)); @@ -813,16 +815,10 @@ class googleGallery : public Gallery return templates; } - void write(const Template &t) + void write(const Template &) { - (void) t; qFatal("Not supported."); } - - void init() - { - // - } }; BR_REGISTER(Gallery, googleGallery) -- libgit2 0.21.4