-
Notifications
You must be signed in to change notification settings - Fork 140
WIP: Eliminate a "C++ initialization order fiasco" for geometryregister #125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -339,15 +339,12 @@ namespace netgen | |||||||||||||||||
public: | ||||||||||||||||||
virtual ~GeometryRegisterArray() | ||||||||||||||||||
Comment on lines
339
to
340
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid accidental misuse (copying) of the singleton.
Suggested change
|
||||||||||||||||||
{ | ||||||||||||||||||
for (int i = 0; i < Size(); i++) | ||||||||||||||||||
delete (*this)[i]; | ||||||||||||||||||
DeleteAll(); | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
virtual shared_ptr<NetgenGeometry> LoadFromMeshFile (istream & ist) const; | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LoadFromMeshFile is not reimplemented, but delegated to the registered GeometryRegister::LoadFromMeshFile.
Suggested change
|
||||||||||||||||||
}; | ||||||||||||||||||
|
||||||||||||||||||
// extern DLL_HEADER NgArray<GeometryRegister*> geometryregister; | ||||||||||||||||||
extern DLL_HEADER GeometryRegisterArray geometryregister; | ||||||||||||||||||
DLL_HEADER GeometryRegisterArray& FetchGeometryRegisterArray (); | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
|
||||||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,8 +33,10 @@ VisualSceneSTLMeshing :: VisualSceneSTLMeshing () | |
{ | ||
selecttrig = 0; | ||
nodeofseltrig = 1; | ||
stlgeometry->SetSelectTrig(selecttrig); | ||
stlgeometry->SetNodeOfSelTrig(nodeofseltrig); | ||
if(stlgeometry){ // don't let the default initializer crash init | ||
stlgeometry->SetSelectTrig(selecttrig); | ||
stlgeometry->SetNodeOfSelTrig(nodeofseltrig); | ||
} | ||
Comment on lines
+36
to
+39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change is unrelated, and incorrect/insufficient (dito below).
See #128 |
||
} | ||
|
||
VisualSceneSTLMeshing :: ~VisualSceneSTLMeshing () | ||
|
Uh oh!
There was an error while loading. Please reload this page.