git-svn-id: svn://db.shs.com.ru/pip@140 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2015-06-05 06:31:20 +00:00
parent 2a96214dfd
commit 4838122a7e
5 changed files with 18 additions and 9 deletions

View File

@@ -176,9 +176,9 @@
#else
#define __STR(x) #x
#define __SSTR(x) __STR(x)
#define LOCATION __FILE__ ":" __SSTR(__LINE__)
#define _PI_STR(x) #x
#define _PI_SSTR(x) _PI_STR(x)
#define LOCATION __FILE__ ":" _PI_SSTR(__LINE__)
#define PIOBJECT(name) \

View File

@@ -94,7 +94,7 @@ void PIBaseTransfer::received(PIByteArray data) {
}
replies_cnt++;
if (is_sending) {
if (h.id >= 0 && h.id < replies.size())
if (h.id < replies.size())
replies[h.id] = pt;
}
if (is_receiving && h.id == 0) {

View File

@@ -47,9 +47,15 @@
# define _stat_call_ stat
# define _stat_link_ lstat
#else
# define _fopen_call_ fopen64
# define _fseek_call_ fseeko64
# define _ftell_call_ ftello64
# if defined(MAC_OS)
# define _fopen_call_ fopen
# define _fseek_call_ fseek
# define _ftell_call_ ftell
# else
# define _fopen_call_ fopen64
# define _fseek_call_ fseeko64
# define _ftell_call_ ftello64
# endif
# define _stat_struct_ struct stat64
# define _stat_call_ stat64
# define _stat_link_ lstat64

View File

@@ -162,7 +162,7 @@ inline PIVector<double> abs(const PIVector<double> & v) {
PIVector<double> result;
result.resize(v.size());
for (uint i = 0; i < v.size(); i++)
result[i] = abs(v[i]);
result[i] = fabs(v[i]);
return result;
}