]> git.lyx.org Git - lyx.git/blobdiff - src/insets/ExternalTransforms.cpp
Get rid of Qt resources
[lyx.git] / src / insets / ExternalTransforms.cpp
index a3bf82df65a08b612cf191233526a57e2c711e22..4f85f9d479f00c202728b20dc39186dcee5ffb02 100644 (file)
@@ -78,7 +78,7 @@ namespace {
 typedef Translator<RotationData::OriginType, string> OriginTranslator;
 OriginTranslator const & originTranslator();
 
-} // namespace anon
+} // namespace
 
 
 void RotationData::origin(string const & o)
@@ -183,7 +183,7 @@ ostream & operator<<(ostream & os, RotationData::OriginType type)
        return os;
 }
 
-} // namespace anon
+} // namespace
 
 
 string const RotationLatexCommand::front_impl() const
@@ -285,8 +285,7 @@ string const sanitizeLatexOption(string const & input)
        lyx::smatch what;
        static lyx::regex const front("^( *\\[,*)(.*)$");
 
-       regex_match(it, end, what, front);
-       if (!what[0].matched) {
+       if (!regex_match(it, end, what, front)) {
                lyxerr << "Unable to sanitize LaTeX \"Option\": "
                       << input << '\n';
                return string();
@@ -298,8 +297,7 @@ string const sanitizeLatexOption(string const & input)
        // with iterator now pointing to 'b'
        static lyx::regex const commas("([^,]*)(,,*)(.*)$");
        for (; it != end;) {
-               regex_match(it, end, what, commas);
-               if (!what[0].matched) {
+               if (!regex_match(it, end, what, commas)) {
                        output += string(it, end);
                        break;
                }
@@ -310,8 +308,7 @@ string const sanitizeLatexOption(string const & input)
        // Strip any trailing commas
        // "...foo,,,]" -> "...foo" ("...foo,,," may be empty)
        static lyx::regex const back("^(.*[^,])?,*\\] *$");
-       regex_match(output, what, back);
-       if (!what[0].matched) {
+       if (!regex_match(output, what, back)) {
                lyxerr << "Unable to sanitize LaTeX \"Option\": "
                       << output << '\n';
                return string();
@@ -336,11 +333,11 @@ void extractIt(boost::any const & any_factory,
                return;
 
        Factory factory = boost::any_cast<Factory>(any_factory);
-       if (!factory.empty())
+       if (factory)
                transformer = factory(data);
 }
 
-} // namespace anon
+} // namespace
 
 
 TransformCommand::ptr_type
@@ -429,7 +426,7 @@ OriginTranslator const & originTranslator()
        return translator;
 }
 
-} // namespace anon
+} // namespace
 
 } // namespace external
 } // namespace lyx