Dungeon Crawl Stone Soup Tracker - DCSS
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
8253 | Bug Report | minor | N/A | 2014-03-10 03:20 | 2014-03-10 04:02 |
|
|||||
Reporter: | floatingatoll | Local or Remote: | Both | ||
Assigned To: | gammafunk | Operating System: | All | ||
Priority: | normal | Console or Tiles: | Both | ||
Status: | resolved | Product Branch: | 0.14 ancient branch | ||
Product Version: | 428849b03052c4253dbc0b0a2ced2c1b | Resolution: | done | ||
Projection: | none | ||||
ETA: | none | Fixed in Branch: | 0.14 ancient branch | ||
|
|||||
Summary: | 0008253: while loop typo in 428849b0 "Make the monster throw ability use a ray path" | ||||
Description: |
428849b03052c4253dbc0b0a2ced2c1bbc12745d (March 8, 2014) introduces the following compiler warning:mon-abil.cc:5127:50: warning: while loop has empty body [-Wempty-body] while (ray.advance() && ray.pos() != *di); ^ mon-abil.cc:5127:50: note: put the semicolon on a separate line to silence this warning Which correctly identifies that there is something resembling a typo'd while loop in the code: while (ray.advance() && ray.pos() != *di); { if (!map_bounds(ray.pos())) break; } As written with the semicolon, it iterates over ray.advance() until exhausted, then does a single check of map_bounds(ray.pos) and breaks out of the distance_iterator for loop. It seems likely that this was intended to break out of the while loop, implying that the semicolon should be removed. Removing the semicolon clears the warnings. I'm not familiar with this code, so I don't know how to test the before/after behavior properly. |
||||
Steps To Reproduce: | |||||
Additional Information: | |||||
System Description: | |||||
Relationships | |||||
Attached Files: | throw_raypath_while.patch [^] (487 bytes) 2014-03-10 03:20 [Show Content] | ||||
|
|||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2014-03-10 03:20 | floatingatoll | New Issue | |||
2014-03-10 03:20 | floatingatoll | File Added: throw_raypath_while.patch | |||
2014-03-10 04:02 | gammafunk | Note Added: 0025533 | |||
2014-03-10 04:02 | gammafunk | Status | new => resolved | ||
2014-03-10 04:02 | gammafunk | Fixed in Branch | => 0.14 development branch | ||
2014-03-10 04:02 | gammafunk | Resolution | open => done | ||
2014-03-10 04:02 | gammafunk | Assigned To | => gammafunk |
Notes | |||||
|
|||||
|
|