|
From: | Martin Guy |
Subject: | Re: Re[2]: [Gnash-dev] "unsinged": enumeral type? |
Date: | Sun, 5 Nov 2006 10:46:56 +0000 |
Isn't the compiler referenceing the expression, not the return? Because path_cmd_move_to is a enum and m_cmd is not?
Yes. the compiler may implement enums as unsigned [int] or it may choose a smaller type if it wishes. It could use bitfields if it wanted. If you know that the path_cmd_move_to value is an enum that only takes positive values (it will if no explicit values are given for the enum values) and that just using the value of p_c_m_t is ok in that context, the fix would be return (m_vertex == 2) ? (unsigned)path_cmd_move_to : m_cmd;
"unsigned == "unsigned int" ??
indeed. M
[Prev in Thread] | Current Thread | [Next in Thread] |