-
Notifications
You must be signed in to change notification settings - Fork 78
Many bug and warning fixes #537
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
base: master
Are you sure you want to change the base?
Changes from all commits
98c9f26
891589d
f94a0ab
3a3d9df
c373f3e
9771e84
fbd0eee
483ad6d
ff0433a
e276924
1cbffcb
9501169
afce3c3
6f60299
afb9dca
36f351d
ca42395
92b94ac
033af5e
ad93a46
9ba0a15
ac82689
763e934
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,12 +46,12 @@ namespace Loki | |
|
|
||
| namespace Private | ||
| { | ||
| template <class Value, class C> | ||
| template <class Value, class C, class K> | ||
| class AssocVectorCompare : public C | ||
| { | ||
| typedef std::pair<typename C::first_argument_type, Value> | ||
| typedef K first_argument_type; | ||
| typedef std::pair<first_argument_type, Value> | ||
| Data; | ||
| typedef typename C::first_argument_type first_argument_type; | ||
|
|
||
| public: | ||
| AssocVectorCompare() | ||
|
|
@@ -98,10 +98,10 @@ namespace Loki | |
| > | ||
| class AssocVector | ||
| : private std::vector< std::pair<K, V>, A > | ||
| , private Private::AssocVectorCompare<V, C> | ||
| , private Private::AssocVectorCompare<V, C, K> | ||
| { | ||
| typedef std::vector<std::pair<K, V>, A> Base; | ||
| typedef Private::AssocVectorCompare<V, C> MyCompare; | ||
| typedef Private::AssocVectorCompare<V, C, K> MyCompare; | ||
|
|
||
| public: | ||
| typedef K key_type; | ||
|
|
@@ -110,20 +110,19 @@ namespace Loki | |
|
|
||
| typedef C key_compare; | ||
| typedef A allocator_type; | ||
| typedef typename A::reference reference; | ||
| typedef typename A::const_reference const_reference; | ||
| typedef typename A::value_type& reference; | ||
| typedef const typename A::value_type* const_reference; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| typedef typename Base::iterator iterator; | ||
| typedef typename Base::const_iterator const_iterator; | ||
| typedef typename Base::size_type size_type; | ||
| typedef typename Base::difference_type difference_type; | ||
| typedef typename A::pointer pointer; | ||
| typedef typename A::const_pointer const_pointer; | ||
| typedef typename A::value_type* pointer; | ||
| typedef const typename A::value_type* const_pointer; | ||
| typedef typename Base::reverse_iterator reverse_iterator; | ||
| typedef typename Base::const_reverse_iterator const_reverse_iterator; | ||
|
|
||
| class value_compare | ||
| : public std::binary_function<value_type, value_type, bool> | ||
| , private key_compare | ||
| : private key_compare | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| { | ||
| friend class AssocVector; | ||
|
|
||
|
|
||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -282,7 +282,8 @@ uint64_t Random::randInt64() | |
| { | ||
| int64_t a = randInt(); | ||
| int64_t b = randInt(); | ||
| return (b + a << 32); | ||
| // a is shifted to the left to create a proper 64 bit integer | ||
| return (b + (a << 32)); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as the old one, but does not throw a warning |
||
| } | ||
|
|
||
|
|
||
|
|
@@ -390,11 +391,11 @@ void Random::initialize(const uint32_t seed) { | |
| void Random::reload() { | ||
| uint32_t *p = state; | ||
| int i; | ||
| for (i = N - M; i--; ++p) | ||
| for (i = +N - M; i--; ++p) | ||
| *p = twist(p[M], p[0], p[1]); | ||
| for (i = M; --i; ++p) | ||
| *p = twist(p[M - N], p[0], p[1]); | ||
| *p = twist(p[M - N], p[0], state[0]); | ||
| *p = twist(p[+M - N], p[0], p[1]); | ||
| *p = twist(p[+M - N], p[0], state[0]); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. enum-enum-conversion was removed, the |
||
|
|
||
| left = N, pNext = state; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -668,6 +668,7 @@ Variant Variant::fromString(const std::string& s, Type t) { | |
| std::string s; | ||
| v.push_back(s); | ||
| } | ||
| return Variant(v); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. was missing for some reason |
||
| } else { | ||
| std::string msg; | ||
| msg += "fromString not implemented for type "; | ||
|
|
@@ -1010,7 +1011,7 @@ Variant::operator const std::vector<Variant>&() const { | |
|
|
||
| #define INT_FUNCTION(to_type, fun, to) \ | ||
| to Variant::fun() const { \ | ||
| switch (type) { \ | ||
| switch (to_type) { \ | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fatal typo |
||
| case Variant::TYPE_BOOL: \ | ||
| return data._t_bool ? 1 : 0; \ | ||
| break; \ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -192,7 +192,7 @@ Vector3d CMZField::getMCField(const Vector3d& pos) const {//Field in molecular c | |
| Bphi = - B1*exp(-z*z/Hc/Hc)*R/r; | ||
| } | ||
| else{ | ||
| - B1*exp(-z*z/Hc/Hc)*R/r1*(3*r/r1- 2*r*r/r1*r1); | ||
| Bphi = - B1*exp(-z*z/Hc/Hc)*R/r1*(3*r/r1- 2*r*r/r1*r1); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. was forgotten |
||
| } | ||
|
|
||
| b.x -= Bphi*sin(phi); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,7 +26,7 @@ Vector3d &PeriodicMagneticField::getExtends() { | |
| return extends; | ||
| } | ||
|
|
||
| void PeriodicMagneticField::setExtends(const Vector3d &origin) { | ||
| void PeriodicMagneticField::setExtends(const Vector3d &extends) { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. propably a typo |
||
| this->extends = extends; | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,7 +59,7 @@ | |
|
|
||
| #ifdef ENABLE_FAST_WAVES | ||
| #include <immintrin.h> | ||
| #include <memory.h> | ||
| #include <memory> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| #endif | ||
|
|
||
| namespace crpropa { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first_argumentis removed in CXX23 so we need an additional template argument, the rest of the code is adjusted, user code is not affected as far as I see