]> git.lyx.org Git - features.git/commitdiff
Remove unnecessary `c_str`
authorYuriy Skalko <yuriy.skalko@gmail.com>
Thu, 10 Dec 2020 12:32:55 +0000 (14:32 +0200)
committerYuriy Skalko <yuriy.skalko@gmail.com>
Thu, 10 Dec 2020 18:14:31 +0000 (20:14 +0200)
src/graphics/PreviewLoader.cpp

index 63ddd436394dd8b704e492435dddbf7b5a69d6fa..d0590f6b2882387524d153f8fabe50ba8d49ad72 100644 (file)
@@ -380,8 +380,8 @@ PreviewLoader::Impl::Impl(PreviewLoader & p, Buffer const & b)
 {
        font_scaling_factor_ = int(buffer_.fontScalingFactor());
        if (theApp()) {
-               fg_color_ = convert(theApp()->hexName(foregroundColor()).c_str(), 16);
-               bg_color_ = convert(theApp()->hexName(backgroundColor()).c_str(), 16);
+               fg_color_ = convert(theApp()->hexName(foregroundColor()), 16);
+               bg_color_ = convert(theApp()->hexName(backgroundColor()), 16);
        } else {
                fg_color_ = 0x0;
                bg_color_ = 0xffffff;
@@ -444,8 +444,8 @@ PreviewLoader::Impl::preview(string const & latex_snippet) const
        int fg = 0x0;
        int bg = 0xffffff;
        if (theApp()) {
-               fg = convert(theApp()->hexName(foregroundColor()).c_str(), 16);
-               bg = convert(theApp()->hexName(backgroundColor()).c_str(), 16);
+               fg = convert(theApp()->hexName(foregroundColor()), 16);
+               bg = convert(theApp()->hexName(backgroundColor()), 16);
        }
        if (font_scaling_factor_ != fs || fg_color_ != fg || bg_color_ != bg) {
                // Schedule refresh of all previews on zoom or color changes.