You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.7 KiB
53 lines
1.7 KiB
9 years ago
|
diff -Nuar mkvtoolnix-6.6.0/src/common/iso639.cpp mkvtoolnix-6.6.0-fix/src/common/iso639.cpp
|
||
|
--- mkvtoolnix-6.6.0/src/common/iso639.cpp 2013-12-01 16:51:35.000000000 +0000
|
||
|
+++ mkvtoolnix-6.6.0-fix/src/common/iso639.cpp 2015-02-09 07:00:26.134735208 +0000
|
||
|
@@ -13,6 +13,7 @@
|
||
|
|
||
|
#include "common/common_pch.h"
|
||
|
|
||
|
+#include <boost/version.hpp>
|
||
|
#include <unordered_map>
|
||
|
|
||
|
#include "common/iso639.h"
|
||
|
@@ -590,20 +591,36 @@
|
||
|
auto range = iso639_languages | badap::indexed(0);
|
||
|
auto end = boost::end(range);
|
||
|
for (auto lang = boost::begin(range); lang != end; lang++) {
|
||
|
- auto names = split(lang->english_name, ";");
|
||
|
+#if BOOST_VERSION < 105600
|
||
|
+ auto const &english_name = lang->english_name;
|
||
|
+ auto index = lang.index();
|
||
|
+#else
|
||
|
+ auto const &english_name = lang->value().english_name;
|
||
|
+ auto index = lang->index();
|
||
|
+#endif
|
||
|
+
|
||
|
+ auto names = split(english_name, ";");
|
||
|
strip(names);
|
||
|
if (brng::find(names, s) != names.end())
|
||
|
- return lang.index();
|
||
|
+ return index;
|
||
|
}
|
||
|
|
||
|
if (!allow_short_english_name)
|
||
|
return -1;
|
||
|
|
||
|
for (auto lang = boost::begin(range); lang != end; lang++) {
|
||
|
- auto names = split(lang->english_name, ";");
|
||
|
+#if BOOST_VERSION < 105600
|
||
|
+ auto const &english_name = lang->english_name;
|
||
|
+ auto index = lang.index();
|
||
|
+#else
|
||
|
+ auto const &english_name = lang->value().english_name;
|
||
|
+ auto index = lang->index();
|
||
|
+#endif
|
||
|
+
|
||
|
+ auto names = split(english_name, ";");
|
||
|
strip(names);
|
||
|
if (names.end() != brng::find_if(names, [&](std::string const &name) { return balg::istarts_with(name, s); }))
|
||
|
- return lang.index();
|
||
|
+ return index;
|
||
|
}
|
||
|
|
||
|
return -1;
|