[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-users] PG_Rect and const
From: |
Eric Ross |
Subject: |
[paragui-users] PG_Rect and const |
Date: |
Sun, 2 Jun 2002 04:22:20 -0400 |
User-agent: |
Internet Messaging Program (IMP) 3.0 |
I've working on the pgmpeg stuff and i got some problem with the way the
Width()/Height() methods are defined. I have this code:
PG_MPEGPlayerWindow(char *file, PG_Widget *parent, const PG_Rect & r)
: PG_Window(parent, r, "The Player")
{
const Uint16 w = r.Width(); // Line 18
..
compiling this i got:
pgmpegplayerwindow.h:18: passing `const PG_Rect' as `this' argument of `Uint16
PG_Rect::Width()' discards qualifiers
This is because 'r' is a const, and the method isn't. If i modify the relevant
.h to:
inline Uint16 Width() const {
return w;
}
it compiles fine. I propose changing the definition of these funciont and add a
"const", but i dont know if it breaks anything (i just modify the installed .h,
i didnt recompile). Any suggestion ?
Eric.
- [paragui-users] PG_Rect and const,
Eric Ross <=