summaryrefslogtreecommitdiff
path: root/src/lib/format.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-10-08 00:20:10 +0100
committerCarl Hetherington <cth@carlh.net>2012-10-08 00:20:10 +0100
commitd7801f3fe5a5ac46aa2c512bcd00be2bee39ed17 (patch)
treefcffa66cf84fb08c55e5547c5551d604df03dcec /src/lib/format.cc
parent7c798f9e215282afb078da53b1d41d4c99e11f5d (diff)
Present fixed formats with video content and variable formats with stills.
Diffstat (limited to 'src/lib/format.cc')
-rw-r--r--src/lib/format.cc41
1 files changed, 1 insertions, 40 deletions
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<Format*>::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 const *>
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;
}