Import Geant4 11.1.0 source tree
This commit is contained in:
+3
-3
@@ -86,7 +86,7 @@ inline unsigned int new_bin_number(const std::vector< axis_t >& aAxes) {
|
||||
template <class T>
|
||||
inline void add_outflow(const std::vector< axis_t >& aAxes,std::vector<T>& aVector) {
|
||||
// aAxes[].m_offset contains the offset without outflow.
|
||||
unsigned int dim = aAxes.size();
|
||||
std::size_t dim = aAxes.size();
|
||||
// new size and offsets :
|
||||
std::vector<int> aoff(dim);
|
||||
|
||||
@@ -107,13 +107,13 @@ inline void add_outflow(const std::vector< axis_t >& aAxes,std::vector<T>& aVect
|
||||
for(int index=0;index<oldn;index++) {
|
||||
// Get new offset of index :
|
||||
offset = index;
|
||||
{for(int iaxis=dim-1;iaxis>=0;iaxis--) {
|
||||
{for(int iaxis=(int)dim-1;iaxis>=0;iaxis--) {
|
||||
is[iaxis] = offset/aAxes[iaxis].m_offset;
|
||||
offset -= is[iaxis] * aAxes[iaxis].m_offset;
|
||||
}}
|
||||
// new offset :
|
||||
offset = 0;
|
||||
{for(unsigned iaxis=0;iaxis<dim;iaxis++) offset += is[iaxis] * aoff[iaxis];}
|
||||
{for(std::size_t iaxis=0;iaxis<dim;iaxis++) offset += is[iaxis] * aoff[iaxis];}
|
||||
aVector[offset] = tmp[index];
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -18,7 +18,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
#include <io.h>
|
||||
#include <sys/stat.h>
|
||||
#else
|
||||
@@ -60,7 +60,7 @@ public: //ifile
|
||||
|
||||
#if defined(__linux__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 2)
|
||||
if (::lseek64(m_file, a_offset, whence) < 0) {
|
||||
#elif defined(_MSC_VER)
|
||||
#elif defined(_MSC_VER) || defined(__MINGW32__)
|
||||
if (::_lseeki64(m_file, a_offset, whence) < 0) {
|
||||
#else
|
||||
if (::lseek(m_file, a_offset, whence) < 0) {
|
||||
@@ -137,7 +137,7 @@ public:
|
||||
#endif
|
||||
|
||||
m_file = _open(a_path.c_str(),
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
O_RDONLY | O_BINARY,S_IREAD | S_IWRITE
|
||||
#else
|
||||
O_RDONLY,0644
|
||||
|
||||
Reference in New Issue
Block a user