Ignore:
Timestamp:
Apr 20, 2011, 11:39:47 PM (11 years ago)
Author:
Sam Hocevar
Message:

core: fix a few useless casts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/imlib/linked.h

    r494 r519  
    2828#include <string.h>
    2929
    30 #define loop(controll,first,inside) { (linked_node *)controll=first; \
    31   if (first) do { inside (linked_node *) controll=controll->next(); } \
    32   while ((linked_node *) controll!=first); }
     30#define loop(controll,first,inside) { controll=first; \
     31  if (first) do { inside controll=controll->next(); } \
     32  while (controll!=first); }
    3333
    3434#define loopt(type,controll,first,inside) { controll=(type *)(first); \
     
    3737
    3838
    39 #define loop_rev(controll,last,inside) { (linked_node *)controll=last; \
    40   if (first) do { inside (linked_node *) controll=controll->last(); } \
    41   while ((linked_node *) controll!=last); }
     39#define loop_rev(controll,last,inside) { controll=last; \
     40  if (first) do { inside controll=controll->last(); } \
     41  while (controll!=last); }
    4242
    4343#define loopct(type,controll,first,cond,inside) { controll=(type *)first; \
     
    7373// openly use the functions listed after the keyword PUBLIC
    7474// type conversions may be nessary if you derive a class of nodes of your own
    75 // for example shape is an class derived from linked_node.
    76 // to add a shape to linked lis I have to say
    77 // mylist.add_end( (linked_node *) myshape_pointer);
     75// for example shape is an class derived from linked_node. to add a shape to
     76// linked list I have to say mylist.add_end(myshape_pointer);
    7877// unlink removes a node from the list via pointers but does not deallocate
    7978// it from the heap
Note: See TracChangeset for help on using the changeset viewer.