mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 08:00:24 +00:00
-Dmitry Timoshkov <dmitry at codeweavers.com>
wrc: Warn for duplicate dialog ids. svn path=/trunk/; revision=38837
This commit is contained in:
parent
38026c3ee6
commit
5b5fdb7799
2 changed files with 17 additions and 0 deletions
|
@ -4656,6 +4656,14 @@ static control_t *ins_ctrl(int type, int special_style, control_t *ctrl, control
|
||||||
if(prev)
|
if(prev)
|
||||||
prev->next = ctrl;
|
prev->next = ctrl;
|
||||||
|
|
||||||
|
/* Check for duplicate identifiers */
|
||||||
|
while (prev)
|
||||||
|
{
|
||||||
|
if (ctrl->id != -1 && ctrl->id == prev->id)
|
||||||
|
parser_warning("Duplicate dialog control id %d\n", ctrl->id);
|
||||||
|
prev = prev->prev;
|
||||||
|
}
|
||||||
|
|
||||||
if(type != -1)
|
if(type != -1)
|
||||||
{
|
{
|
||||||
ctrl->ctlclass = new_name_id();
|
ctrl->ctlclass = new_name_id();
|
||||||
|
@ -5773,3 +5781,4 @@ static int rsrcid_to_token(int lookahead)
|
||||||
return token;
|
return token;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1966,6 +1966,14 @@ static control_t *ins_ctrl(int type, int special_style, control_t *ctrl, control
|
||||||
if(prev)
|
if(prev)
|
||||||
prev->next = ctrl;
|
prev->next = ctrl;
|
||||||
|
|
||||||
|
/* Check for duplicate identifiers */
|
||||||
|
while (prev)
|
||||||
|
{
|
||||||
|
if (ctrl->id != -1 && ctrl->id == prev->id)
|
||||||
|
parser_warning("Duplicate dialog control id %d\n", ctrl->id);
|
||||||
|
prev = prev->prev;
|
||||||
|
}
|
||||||
|
|
||||||
if(type != -1)
|
if(type != -1)
|
||||||
{
|
{
|
||||||
ctrl->ctlclass = new_name_id();
|
ctrl->ctlclass = new_name_id();
|
||||||
|
|
Loading…
Reference in a new issue