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

Avoid copying of parameters; some fixes for _HAPropsSI_inputs #493

Merged
merged 2 commits into from Feb 24, 2015
Merged

Avoid copying of parameters; some fixes for _HAPropsSI_inputs #493

merged 2 commits into from Feb 24, 2015

Conversation

mikekaganski
Copy link
Contributor

  1. Started to optimize function arguments to use refs (more to come)
  2. Fixed some things in _HAPropsSI_inputs

avoided double lookup for input key (match_input_key + get_input_key);

unified MoleFractionWater call;

if ((key = get_input_key(input_keys, GIVEN_HUMRAT)) && key >= 0) may
give false negatives if get_input_key returns 0;

added throw
long other = 1 - key; // 2 element vector
T = input_vals[key];
switch(input_keys[other]){
switch(givens othergiven = input_keys[other]){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I had no idea this was even possible in C++

ibell added a commit that referenced this pull request Feb 24, 2015
Avoid copying of parameters; some fixes for _HAPropsSI_inputs
@ibell ibell merged commit 6d39bf8 into CoolProp:master Feb 24, 2015
@ibell ibell modified the milestone: v5.0.8 Mar 1, 2015
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

Successfully merging this pull request may close these issues.

None yet

2 participants