From d7801f3fe5a5ac46aa2c512bcd00be2bee39ed17 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 8 Oct 2012 00:20:10 +0100 Subject: Present fixed formats with video content and variable formats with stills. --- src/lib/format.cc | 41 +---------------------------------------- src/lib/format.h | 2 -- 2 files changed, 1 insertion(+), 42 deletions(-) (limited to 'src/lib') diff --git a/src/lib/format.cc b/src/lib/format.cc index 115e03691..aaf5211f9 100644 --- a/src/lib/format.cc +++ b/src/lib/format.cc @@ -123,34 +123,6 @@ Format::from_metadata (string m) return from_id (m); } -/** @param f A Format. - * @return Index of f within our static list, or -1. - */ -int -Format::as_index (Format const * f) -{ - vector::size_type i = 0; - while (i < _formats.size() && _formats[i] != f) { - ++i; - } - - if (i == _formats.size ()) { - return -1; - } - - return i; -} - -/** @param i An index returned from as_index(). - * @return Corresponding Format. - */ -Format const * -Format::from_index (int i) -{ - assert (i >= 0 && i < int(_formats.size ())); - return _formats[i]; -} - /** @return All available formats */ vector Format::all () @@ -205,16 +177,5 @@ VariableFormat::ratio_as_float (Film const * f) const string VariableFormat::name () const { - stringstream s; - if (!_nickname.empty ()) { - s << _nickname << " ("; - } - - s << "without stretching"; - - if (!_nickname.empty ()) { - s << ")"; - } - - return s.str (); + return _nickname; } diff --git a/src/lib/format.h b/src/lib/format.h index 6172dc57d..fd6cdbece 100644 --- a/src/lib/format.h +++ b/src/lib/format.h @@ -71,9 +71,7 @@ public: static Format const * from_nickname (std::string n); static Format const * from_metadata (std::string m); - static Format const * from_index (int i); static Format const * from_id (std::string i); - static int as_index (Format const * f); static std::vector all (); static void setup_formats (); -- cgit v1.2.3