General performance question
- From: Jonas Platte <jonasplatte myopera com>
- To: gtkmm-list gnome org
- Subject: General performance question
- Date: Sun, 08 Sep 2013 12:42:46 +0200
Hello, I've got a simple question: In gtkmm, when I want to set a
boolean property of any object, like a widget, and I don't know it's
current state, should I first check if the state isn't how I want it to
be, or should I always call set? For example, in the case I want a
widget to get insensitive, would I write:
if(widget.get_sensitive()) widget.set_sensitive(false);
or only
widget.set_sensitive(false);
And if it doesn't have a significant influence on the performance, which
one would you consider the better style?
Thanks,
Jonas
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]