Re: [Vala] Autocasting for lambdas

2009-04-23 Thread Sam Liddicott
* pancake wrote, On 23/04/09 10:33: It is possible to reduce this code? gw.graph.nodes.sort( (a,b) = { Grava.Node *na = a; Grava.Node *nb = b; return (int)(na-y - nb-y); } ); I don't think you can do this, but try it - it would be nice if it would work: gw.graph.nodes.sort( (Grava.Node

Re: [Vala] Autocasting for lambdas

2009-04-23 Thread pancake
Sam Liddicott wrote: * pancake wrote, On 23/04/09 10:33: It is possible to reduce this code? gw.graph.nodes.sort( (a,b) = { Grava.Node *na = a; Grava.Node *nb = b; return (int)(na-y - nb-y); } ); I don't think you can do this, but try it - it would be nice if it would work: