Skip to content
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

Make Curve object use std::vector under the hood #477

Open
bHimes opened this issue Jan 25, 2024 · 0 comments
Open

Make Curve object use std::vector under the hood #477

bHimes opened this issue Jan 25, 2024 · 0 comments

Comments

@bHimes
Copy link
Collaborator

bHimes commented Jan 25, 2024

The Curve object manages a two-dimensional array that is dynamically resized as needed using home-spun logic.

While there are many cases where we do not want to modernize aspects of cisTEM: e.g.

  1. use of wxString and wxArray as wrappers to std::string and std::vector makes interfacing with WX easier as well as maintaining consistency across the code base (where fitting.)
  2. Explicit memory management for objects that require special considerations like alignment, padding, or complex object ownership/lifetime.

In this specific case the memory management by Curve, see for example Curve::CheckMemory() which is needlessly duplicating behavior encapsulated in std::vector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant