View Issue Details

IDProjectCategoryView StatusLast Update
0031067CommunityOCCT:Visualizationpublic2020-12-02 17:12
ReporterBenjaminBihler Assigned Toapn  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformAOSL 
Product Version7.4.0 
Target Version7.5.0Fixed in Version7.5.0 
Summary0031067: Visualization - Aspect_Window::DoResize() should be a non-const method
DescriptionThe 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?
TagsNo tags attached.
Test case numberNot needed

Activities

git

2019-10-15 20:36

administrator   ~0088142

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.

git

2019-10-15 20:51

administrator   ~0088146

Branch CR31067 has been updated forcibly by kgv.

SHA-1: d50dc0689050a96ea7ceb0164046b4eaeb4c59ed

kgv

2019-10-15 23:52

developer   ~0088149

Patch is ready for review.

abv

2019-10-16 08:43

manager   ~0088156

Good change; but should not we describe it in Upgrade Guide?

git

2019-10-16 10:43

administrator   ~0088158

Branch CR31067 has been updated forcibly by kgv.

SHA-1: 04bd4f403cd62dc36501f4527b5413ef1747afef

kgv

2019-10-16 10:43

developer   ~0088159

> should not we describe it in Upgrade Guide?
Added.

abv

2019-10-16 16:25

manager   ~0088181

Reviewed, please integrate

git

2019-10-23 11:51

administrator   ~0088488

Branch CR31067 has been deleted by kgv.

SHA-1: 04bd4f403cd62dc36501f4527b5413ef1747afef

Related Changesets

occt: master 1a5007a9

2019-10-19 12:38:48

kgv


Committer: apn Details Diff
0031067: Visualization - Aspect_Window::DoResize() should be a non-const method

Removed 'const' from Aspect_Window::DoResize() virtual method.
Affected Issues
0031067
mod - dox/dev_guides/upgrade/upgrade.md Diff File
mod - samples/glfw/GlfwOcctWindow.cpp Diff File
mod - samples/glfw/GlfwOcctWindow.h Diff File
mod - samples/java/jniviewer/jni/OcctJni_Window.hxx Diff File
mod - samples/qt/AndroidQt/src/AndroidQt_Window.h Diff File
mod - samples/qt/Common/src/OcctWindow.cxx Diff File
mod - samples/qt/Common/src/OcctWindow.h Diff File
mod - src/Aspect/Aspect_NeutralWindow.hxx Diff File
mod - src/Aspect/Aspect_Window.hxx Diff File
mod - src/Cocoa/Cocoa_Window.hxx Diff File
mod - src/Cocoa/Cocoa_Window.mm Diff File
mod - src/WNT/WNT_Window.cxx Diff File
mod - src/WNT/WNT_Window.hxx Diff File
mod - src/Xw/Xw_Window.cxx Diff File
mod - src/Xw/Xw_Window.hxx Diff File

Issue History

Date Modified Username Field Change
2019-10-14 13:40 BenjaminBihler New Issue
2019-10-14 13:40 BenjaminBihler Assigned To => kgv
2019-10-15 20:36 git Note Added: 0088142
2019-10-15 20:51 git Note Added: 0088146
2019-10-15 23:52 kgv Note Added: 0088149
2019-10-15 23:52 kgv Assigned To kgv => abv
2019-10-15 23:52 kgv Status new => resolved
2019-10-16 08:43 abv Note Added: 0088156
2019-10-16 08:43 abv Assigned To abv => kgv
2019-10-16 08:43 abv Status resolved => feedback
2019-10-16 10:43 git Note Added: 0088158
2019-10-16 10:43 kgv Note Added: 0088159
2019-10-16 10:43 kgv Assigned To kgv => abv
2019-10-16 10:43 kgv Status feedback => resolved
2019-10-16 16:25 abv Note Added: 0088181
2019-10-16 16:25 abv Assigned To abv => bugmaster
2019-10-16 16:25 abv Status resolved => reviewed
2019-10-23 01:07 apn Changeset attached => occt master 1a5007a9
2019-10-23 01:07 apn Assigned To bugmaster => apn
2019-10-23 01:07 apn Status reviewed => verified
2019-10-23 01:07 apn Resolution open => fixed
2019-10-23 11:51 git Note Added: 0088488
2019-10-23 16:52 apn Test case number => Not needed
2020-12-02 16:40 emo Fixed in Version => 7.5.0
2020-12-02 17:12 emo Status verified => closed