This site is no longer active and is available for archival purposes only. Registration and login is disabled.

POINT struct operators?


POINT struct operators?

Postby fzammetti » Aug 5, 2003 @ 4:12am

...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Postby meloditronic » Aug 5, 2003 @ 5:22pm

From what I know, POINT is just a standard windows C struct. No overloaded operators. If you really need it, try this:

bool operator == (POINT &p1, POINT &p2)
{
return (p1.x==p2.x) && (p1.y==p2.y);
}
meloditronic
pm Member
 
Posts: 7
Joined: Jul 23, 2003 @ 6:41pm


Postby fzammetti » Aug 5, 2003 @ 5:26pm

Thanks for the reply, I wound up doing exactly that (geez, I think the code is identical to the letter!).

As per my original post, Johan, I offer this as a suggestion to add to the next release. I suspect comparing one POINT to another is a pretty common function, makes sense to be included I think.
...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Postby Sm!rk » Aug 6, 2003 @ 9:46am

User avatar
Sm!rk
pm Member
 
Posts: 172
Joined: Dec 16, 2002 @ 4:40pm


Postby Johan » Aug 6, 2003 @ 9:56am

Johan Sanneblad, M.Sc, Ph.D
GapiDraw Systems Architect
[]
User avatar
Johan
pm Member
 
Posts: 1843
Joined: Jan 12, 2002 @ 12:38pm
Location: Sweden


Postby fzammetti » Aug 6, 2003 @ 2:09pm

...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Make it an option?

Postby mlepage » Aug 6, 2003 @ 6:45pm

I'm not sure it's a good idea to unconditionally overload op== for POINTs in a library. Maybe make it a conditional option via a macro flag? Even if it's on by default, it lets us disable it if we need to.
User avatar
mlepage
pm Insider
 
Posts: 1050
Joined: Aug 3, 2003 @ 4:47am
Location: Canada


Postby fzammetti » Aug 6, 2003 @ 6:55pm

...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Return to GapiDraw


Sort


Forum Description

The Cross-platform Graphics SDK for Palms, Pocket PCs, Symbian Devices, and Stationary PCs.

Moderators:

sponge, Johan

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron