MantisBT - Community
View Issue Details
0031067Community[OCCT] OCCT:Visualizationpublic2019-10-14 13:402019-10-23 16:52
BenjaminBihler 
apn 
normalminor 
verifiedfixed 
ALL
[OCCT] 7.4.0 
[OCCT] 7.5.0 
Not needed
0031067: Visualization - Aspect_Window::DoResize() should be a non-const method
The method DoResize() of Aspect_Window is declared const. This makes it necessary to use a C-style cast or a const_cast to cast away the constness of the member fields myXLeft, ... myYBottom in OcctWindow::DoResize() because here the member fields are modified.

Such code is surprising and weird. Depending on the context it might also be undefined behaviour.

Wouldn't it be better to make Aspect_Window::DoResize() a non-const method?
No tags attached.
Issue History
2019-10-14 13:40BenjaminBihlerNew Issue
2019-10-14 13:40BenjaminBihlerAssigned To => kgv
2019-10-15 20:36gitNote Added: 0088142
2019-10-15 20:51gitNote Added: 0088146
2019-10-15 23:52kgvNote Added: 0088149
2019-10-15 23:52kgvAssigned Tokgv => abv
2019-10-15 23:52kgvStatusnew => resolved
2019-10-16 08:43abvNote Added: 0088156
2019-10-16 08:43abvAssigned Toabv => kgv
2019-10-16 08:43abvStatusresolved => feedback
2019-10-16 10:43gitNote Added: 0088158
2019-10-16 10:43kgvNote Added: 0088159
2019-10-16 10:43kgvAssigned Tokgv => abv
2019-10-16 10:43kgvStatusfeedback => resolved
2019-10-16 16:25abvNote Added: 0088181
2019-10-16 16:25abvAssigned Toabv => bugmaster
2019-10-16 16:25abvStatusresolved => reviewed
2019-10-23 01:07apnChangeset attached => occt master 1a5007a9
2019-10-23 01:07apnAssigned Tobugmaster => apn
2019-10-23 01:07apnStatusreviewed => verified
2019-10-23 01:07apnResolutionopen => fixed
2019-10-23 11:51gitNote Added: 0088488
2019-10-23 16:52apnTest case number => Not needed

Notes
(0088142)
git   
2019-10-15 20:36   
Branch CR31067 has been created by kgv.

SHA-1: 81abbff06ec4d8bea605634a54bb72082e8a7279


Detailed log of new commits:

Author: kgv
Date: Tue Oct 15 20:36:06 2019 +0300

    0031067: Visualization - Aspect_Window::DoResize() should be a non-const method
    
    Removed 'const' from Aspect_Window::DoResize() virtual method.
(0088146)
git   
2019-10-15 20:51   
Branch CR31067 has been updated forcibly by kgv.

SHA-1: d50dc0689050a96ea7ceb0164046b4eaeb4c59ed
(0088149)
kgv   
2019-10-15 23:52   
Patch is ready for review.
(0088156)
abv   
2019-10-16 08:43   
Good change; but should not we describe it in Upgrade Guide?
(0088158)
git   
2019-10-16 10:43   
Branch CR31067 has been updated forcibly by kgv.

SHA-1: 04bd4f403cd62dc36501f4527b5413ef1747afef
(0088159)
kgv   
2019-10-16 10:43   
> should not we describe it in Upgrade Guide?
Added.
(0088181)
abv   
2019-10-16 16:25   
Reviewed, please integrate
(0088488)
git   
2019-10-23 11:51   
Branch CR31067 has been deleted by kgv.

SHA-1: 04bd4f403cd62dc36501f4527b5413ef1747afef