Fresco/Berlin/modules/Widgets/Motif WidgetKit.cc,1.32,1.33

Tobias Hunger <[email protected]>
Newsgroups gmane.comp.video.fresco.cvs
Message-ID <[email protected]>
Update of /cvs/fresco/Fresco/Berlin/modules/Widgets/Motif
In directory purcel:/tmp/cvs-serv9995/Berlin/modules/Widgets/Motif

Modified Files:
	WidgetKit.cc 
Log Message:
Cleanup the cleanup.

A new template create_and_set_body added to KitImpl. That gets us around the
need to define a temporary in most places, shortening the code even further.


Index: WidgetKit.cc
===================================================================
RCS file: /cvs/fresco/Fresco/Berlin/modules/Widgets/Motif/WidgetKit.cc,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- WidgetKit.cc	23 Jan 2003 22:31:06 -0000	1.32
+++ WidgetKit.cc	25 Jan 2003 22:37:04 -0000	1.33
@@ -165,8 +165,8 @@
 Graphic_ptr WidgetKit::gauge(BoundedValue_ptr value)
 {
   Color gray = {0.5, 0.5, 0.5, 1.0};
-  Graphic_ptr g = create<Graphic>(new Gauge(value, gray));
-  value->attach(Observer_ptr(g));
+  Graphic_var g = create<Graphic>(new Gauge(value, gray));
+  value->attach(Observer_ptr(Graphic_ptr(g)));
 
   Fresco::ToolKit::FrameSpec spec;
   spec.brightness(0.5); spec._d(Fresco::ToolKit::outset);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.