| Index: gfx/gtk_util.h
|
| diff --git a/gfx/gtk_util.h b/gfx/gtk_util.h
|
| index 5af37df3fc290f3f5a3bc173cc15f67b4f348a62..143694a90967c81d98a558c3bdaa61001ca24ff2 100644
|
| --- a/gfx/gtk_util.h
|
| +++ b/gfx/gtk_util.h
|
| @@ -50,24 +50,12 @@ double GetPangoResolution();
|
|
|
| } // namespace gfx
|
|
|
| -namespace {
|
| -// A helper class that will g_object_unref |p| when it goes out of scope.
|
| -// This never adds a ref, it only unrefs.
|
| -template <typename Type>
|
| -struct GObjectUnrefer {
|
| - void operator()(Type* ptr) const {
|
| - if (ptr)
|
| - g_object_unref(ptr);
|
| - }
|
| -};
|
| -} // namespace
|
| -
|
| // It's not legal C++ to have a templatized typedefs, so we wrap it in a
|
| // struct. When using this, you need to include ::Type. E.g.,
|
| // ScopedGObject<GdkPixbufLoader>::Type loader(gdk_pixbuf_loader_new());
|
| template<class T>
|
| struct ScopedGObject {
|
| - typedef scoped_ptr_malloc<T, GObjectUnrefer<T> > Type;
|
| + typedef scoped_ptr_malloc<T, FreeFnAdapter<g_object_unref> > Type;
|
| };
|
|
|
| #endif // GFX_GTK_UTIL_H_
|
|
|