ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtcolor.C
(Generate patch)

Comparing rxvt-unicode/src/rxvtcolor.C (file contents):
Revision 1.14 by pcg, Thu Apr 8 20:31:45 2004 UTC vs.
Revision 1.15 by root, Sun May 30 19:12:42 2004 UTC

55} 55}
56 56
57template<class T> 57template<class T>
58T *refcache<T>::get (const char *id) 58T *refcache<T>::get (const char *id)
59{ 59{
60 for (T **i = begin (); i < end (); ++i) 60 for (T **i = this->begin (); i < this->end (); ++i)
61 { 61 {
62 if (!strcmp (id, (*i)->id)) 62 if (!strcmp (id, (*i)->id))
63 { 63 {
64 (*i)->referenced++; 64 (*i)->referenced++;
65 return *i; 65 return *i;
70 70
71 obj->referenced = 1; 71 obj->referenced = 1;
72 72
73 if (obj && obj->init ()) 73 if (obj && obj->init ())
74 { 74 {
75 push_back (obj); 75 this->push_back (obj);
76 return obj; 76 return obj;
77 } 77 }
78 else 78 else
79 { 79 {
80 delete obj; 80 delete obj;
88 if (!obj) 88 if (!obj)
89 return; 89 return;
90 90
91 if (!--obj->referenced) 91 if (!--obj->referenced)
92 { 92 {
93 erase (find (begin (), end (), obj)); 93 this->erase (find (this->begin (), this->end (), obj));
94 delete obj; 94 delete obj;
95 } 95 }
96} 96}
97 97
98template<class T> 98template<class T>
99refcache<T>::~refcache () 99refcache<T>::~refcache ()
100{ 100{
101 while (size ()) 101 while (this->size ())
102 put (*begin ()); 102 put (*this->begin ());
103} 103}
104 104
105///////////////////////////////////////////////////////////////////////////// 105/////////////////////////////////////////////////////////////////////////////
106 106
107static void 107static void
307 return XInternAtom (display, name, False); 307 return XInternAtom (display, name, False);
308} 308}
309 309
310///////////////////////////////////////////////////////////////////////////// 310/////////////////////////////////////////////////////////////////////////////
311 311
312template refcache<rxvt_display>; 312template class refcache<rxvt_display>;
313refcache<rxvt_display> displays; 313refcache<rxvt_display> displays;
314 314
315///////////////////////////////////////////////////////////////////////////// 315/////////////////////////////////////////////////////////////////////////////
316 316
317bool 317bool

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines