Commit Graph

29 Commits

Author SHA1 Message Date
Ian Bell
0afd2f4400 Switch string formatting to use the cppformat library; see #907 2016-02-01 15:57:33 -07:00
Ian Bell
915416d47c Added support for building .so for Android 2015-09-28 23:41:18 -06:00
Ian Bell
4970a02164 Made fixes for powerpc for VxWorks 2015-03-25 04:37:08 +01:00
mikekaganski
a7d33d5f77 Fix Coverity CID 38585 2015-03-07 14:28:46 +10:00
mikekaganski
b52a76408f fix warning about deleting void* 2015-03-01 16:59:06 +10:00
mikekaganski
b288b0c096 undo adding unnecessary header 2015-03-01 16:49:33 +10:00
Ian Bell
ecbeaed8fc include "crossplatform_shared_ptr.h"
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-28 20:12:12 -07:00
Ian Bell
b28583f4b6 Fix for shared_ptr
@mikekaganski, different compilers put shared_ptr in different namespaces, which is why we handle things in the way that we do in crossplatform_shared_ptr.h
2015-02-28 20:01:05 -07:00
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
mikekaganski
869d1afc71 More ref args 2015-02-27 00:56:38 +10:00
mikekaganski
4c8421165c thread_local: one more (hopefully portable) attempt 2015-02-25 20:20:05 +10:00
Ian Bell
44ad30bcb0 Fix const ref for strsplit
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-24 21:29:53 -07:00
Ian Bell
2f029d40e7 Revert the thread_local; not all our supported compilers can do C++11
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-24 21:27:14 -07:00
mikekaganski
c38c4c468f Fix directory size calculations 2015-02-25 13:58:41 +10:00
Ian Bell
fe396aa3f5 Windows uses wstring, *nix uses string
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-23 22:46:49 -07:00
Ian Bell
518502145d Fixed string conversions 2015-02-23 22:41:20 -07:00
Ian Bell
280e9afc78 Fixed function pointer
string and wstring versions

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-23 22:36:55 -07:00
Ian Bell
b93a8e0106 Added directory size functions
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-23 22:24:47 -07:00
mikekaganski
f8bb1c0044 Avoid copying parameters 2015-02-24 09:26:11 +10:00
Ian Bell
6d2f52f230 Squashed bugs found by @mikekaganski; See #483
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-21 11:26:24 -07:00
Ian Bell
8327d54ea2 Replaced all tabs with spaces (finally) in C++ files
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-11-19 12:16:14 -05:00
Ian Bell
3310d1cf11 Fixed (?) splines in critical region
I have no explanation for the broken code that used to be in the solve_cubic function.  Seems it was related to the linear or quadratic cases but it makes no sense. Removed the code.

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-10-14 14:49:19 +02:00
Ian Bell
86f52bdf4e Phase Envelope calculations now include Tsat_max and psat_max, along with indices thereof.
The Tsat_max and psat_max values are calculated using exact solution based on finding dT/dP and dp/dT equaling zero by a 1D solution in rhov.

See also https://github.com/CoolProp/CoolProp/issues/133

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-09-10 15:17:19 +02:00
Ian Bell
05f4c64049 Potentially fixed critical spline code for linear and quadratic "splines". Closes https://github.com/CoolProp/CoolProp/issues/111
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-26 19:31:25 +02:00
Ian Bell
d3261395bf Replaced all fabs() with std::abs()
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-23 14:56:07 +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
b0098dbae5 Fixed strsplit
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-04 15:11:33 +02:00
Ian Bell
a2f45e29da Added functionality for trivial outputs
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-03 18:55:52 +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