mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[liba] Update the size_t type definition
size_t must be an unsigned it. Moreover, by definition, size_t is the return type of the "sizeof" operator, which is defined by the compiler. Both GCC and clang define a __SIZE_TYPE__ macro to let the libc header know about the type used by the sizeof operator. Change-Id: Ie44f1ba69fe2b1d5ce5cd9a0e7fd8a7f10c1199d
This commit is contained in:
@@ -2,6 +2,6 @@
|
||||
#define LIBA_STDDEF_H
|
||||
|
||||
#define NULL 0
|
||||
typedef int size_t;
|
||||
typedef __SIZE_TYPE__ size_t;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -46,7 +46,7 @@ Expression * CommutativeOperation::clone() const {
|
||||
|
||||
float CommutativeOperation::approximate(Context& context) const {
|
||||
float result = m_operands[0]->approximate(context);
|
||||
for (size_t i=1; i<m_numberOfOperands; i++) {
|
||||
for (int i=1; i<m_numberOfOperands; i++) {
|
||||
float next = m_operands[i]->approximate(context);
|
||||
result = this->operateApproximatevelyOn(result, next);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user