Commit Graph

11 Commits

Author SHA1 Message Date
mikekaganski
28691e8e75 const, ref and iterator optimization
1. Another set of arguments optimized:
* args-by-val converted to args-by-ref
* in some cases, reverse has been done, if that is better: if the
object's copy is modified in the func, it's better to avoid extra copy
from arg to local var
2. some const functions marked as such (this is just a beginning)
3. iterators were replaced with const_iterators where applicable
4. catches that catch std::exception& changed to catch (...) - that is
safer; if exception handling is restructured, this will have to be
reconsidered anyway
5. removed some basic structures' constructors; changed them to hold
const char*s to avoid unnecessary string constructions;
6. in some places, moved variable declarations to their definitions, to
avoid calling default constructors and then assigning
7. removed some unnecessary shared_pointers in favor of local objects;
8. in FORTRAN-style functions, added const specifiers to input doubles;
9. fixed a place where values were inserted into a map while iterating
through it
10. fixed is_valid_*_derivative: they could accept incorrect values and
throw when upper index is less than lower
2015-03-01 10:51:01 +10:00
Ian Bell
1b91d51ae6 Updates to make VxWorks play nicely with CMake using cross-compilation 2014-11-13 05:33:49 +01:00
Ian Bell
0dcdf7ef5d Implemented PQ for pseudo-pure to close https://github.com/CoolProp/CoolProp/issues/92
* As a consequence, made update function take CoolProp::input_pairs enum as first input (thanks @jowr for the idea)
* Decoupled the pre_update and post_update functions in order to allow for more creative update functions using guess values, etc.

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-20 21:44:13 +02:00
Ian Bell
d4e7a6015e Silenced a few warnings
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-15 15:57:33 +02:00
Ian Bell
d545376efd Got Javascript wrapper working again - required changing all std::tr1::shared_ptr to shared_ptr
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-06-03 21:59:41 +02:00
Ian Bell
cb497b443c Added crossplatform_shared_ptr to allow shared_ptr cleanly on all architectures without needing variable namespace definition 2014-06-03 20:58:24 +02:00
Ian Bell
c468339768 Implemented test for GERG 2008 residual term and changed include from <tr1/memory> to <memory>
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-06-01 19:29:09 +02:00
Ian Bell
10aaae4649 Added tr1/memory include for linux compilation 2014-05-30 12:02:32 +02:00
Ian Bell
7b8606f323 No more deletes used anywhere in the codebase. Only std::tr1::shared_ptr are used. Should be portable solution.
All tests run, no memory leaks according to VLD

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-05-28 19:45:04 +02:00
Ian bell
df0127edea Updated speed test (does it work? not sure)
Signed-off-by: Ian bell <ian.h.bell@gmail.com>
2014-05-15 22:26:22 +02:00
Ian bell
b3847c7522 Initial commit for v5, but this time with the right line endings
Signed-off-by: Ian bell <ian.h.bell@gmail.com>
2014-05-14 12:46:24 +02:00