[gtkmm] Demos: Remove static_cast<int> on Pango::Weight
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Demos: Remove static_cast<int> on Pango::Weight
- Date: Sun, 11 Jun 2017 11:22:12 +0000 (UTC)
commit c5cee7930e7f694246664015c567665564bee48e
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Sun Jun 11 13:18:51 2017 +0200
Demos: Remove static_cast<int> on Pango::Weight
* demos/gtk-demo/example_textview.cc:
* demos/gtk-demo/textwidget.cc: Remove unnecessary static_cast<int>.
Pango::Weight can now be implicitly converted to int. Bug 86864
demos/gtk-demo/example_textview.cc | 4 ++--
demos/gtk-demo/textwidget.cc | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/demos/gtk-demo/example_textview.cc b/demos/gtk-demo/example_textview.cc
index 3d38651..3159e31 100644
--- a/demos/gtk-demo/example_textview.cc
+++ b/demos/gtk-demo/example_textview.cc
@@ -120,11 +120,11 @@ void Example_TextView::create_tags(Glib::RefPtr<Gtk::TextBuffer>& refBuffer)
Glib::RefPtr<Gtk::TextBuffer::Tag> refTag;
refTag = refBuffer->create_tag("heading");
- refTag->property_weight() = static_cast<int>(Pango::Weight::BOLD);
+ refTag->property_weight() = Pango::Weight::BOLD;
refTag->property_size() = 15 * Pango::SCALE;
refBuffer->create_tag("italic")->property_style() = Pango::Style::ITALIC;
- refBuffer->create_tag("bold")->property_weight() = static_cast<int>(Pango::Weight::BOLD);
+ refBuffer->create_tag("bold")->property_weight() = Pango::Weight::BOLD;
refBuffer->create_tag("big")->property_size() = 20 * Pango::SCALE;
refBuffer->create_tag("xx-small")->property_scale() = Pango::SCALE_XX_SMALL;
refBuffer->create_tag("x-large")->property_scale() = Pango::SCALE_X_LARGE;
diff --git a/demos/gtk-demo/textwidget.cc b/demos/gtk-demo/textwidget.cc
index ab6160e..6833f5e 100644
--- a/demos/gtk-demo/textwidget.cc
+++ b/demos/gtk-demo/textwidget.cc
@@ -53,7 +53,7 @@ TextWidget::TextWidget(bool is_source)
refTag = m_refTextBuffer->create_tag("string");
refTag->property_foreground() = "RosyBrown";
- refTag->property_weight() = static_cast<int>(Pango::Weight::BOLD);
+ refTag->property_weight() = Pango::Weight::BOLD;
refTag = m_refTextBuffer->create_tag("control");
@@ -64,7 +64,7 @@ TextWidget::TextWidget(bool is_source)
refTag->property_foreground() = "burlywood4";
refTag = m_refTextBuffer->create_tag("function");
- refTag->property_weight() = static_cast<int>(Pango::Weight::BOLD);
+ refTag->property_weight() = Pango::Weight::BOLD;
refTag->property_foreground() = "DarkGoldenrod4";
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]