tipo in nArray.h

View: New views
2 Messages — Rating Filter:   Alert me  

tipo in nArray.h

by je.a.le :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

in nArray.h (code/nebula2/inc/util), function :

    TYPE& At(int index);

must be :

    TYPE& At(int index) const;

else compiling (may) raise and error


--
for my 3d work it's over there --> http://j.a.l.free.fr/3dsmax
update 26 Aug 2006


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

*** NOTE: To reply to the list use "reply to all",  ***
***       to reply direct to the sender use "reply" ***
_______________________________________________
Nebuladevice-discuss mailing list
Nebuladevice-discuss@...
https://lists.sourceforge.net/lists/listinfo/nebuladevice-discuss

Re: tipo in nArray.h

by ZHANG Zikai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2006/12/10, je.a.le <je.a.le@...>:

> in nArray.h (code/nebula2/inc/util), function :
>
>    TYPE& At(int index);
>
> must be :
>
>    TYPE& At(int index) const;
>
> else compiling (may) raise and error
>


hi,
Notice the comment of the method, it may grow the array if the index
is outside the array range. Use operator [], which has the const
modifier.

Regards,
kaikai

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

*** NOTE: To reply to the list use "reply to all",  ***
***       to reply direct to the sender use "reply" ***
_______________________________________________
Nebuladevice-discuss mailing list
Nebuladevice-discuss@...
https://lists.sourceforge.net/lists/listinfo/nebuladevice-discuss