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

Simplification. Initialise with vector.assign(length, value) instead of vector.swap(<vector<...()) #58

Open
JamesParrott opened this issue Jun 9, 2024 · 1 comment

Comments

@JamesParrott
Copy link
Collaborator

JamesParrott commented Jun 9, 2024

To compile on Zig, use of temporary variables is more restricted. A number of changes were made from:

		skim_matrix_sum_distance.swap(vector<vector<long double>>(skim_origins.size(),vector<long double>(skim_destinations.size(),0.)));

etc. to:

		skim_matrix_sum_distance.assign(skim_origins.size(),vector<long double>(skim_destinations.size(),0.));

etc.

E.g.:

skim_matrix_sum_distance.swap(vector<vector<long double>>(skim_origins.size(),vector<long double>(skim_destinations.size(),0.)));

@JamesParrott
Copy link
Collaborator Author

Included in #74 on Cross_Platform branch

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

No branches or pull requests

1 participant