Commit 911013ed authored by tgaripov's avatar tgaripov

Fixes for gcc

parent 52d28d52
......@@ -527,7 +527,7 @@ namespace INMOST
/// Build an expression associated with variable expression on provided element e.
multivar_expression operator [](const Storage & e) const
{
if( isPrivateMarker(marker) ? e->GetPrivateMarker(marker) : e->GetMarker(marker) )
if( isPrivate(marker) ? e->GetPrivateMarker(marker) : e->GetMarker(marker) )
return ArgA[e];
else return ArgB[e];
}
......
......@@ -1169,7 +1169,7 @@ ecl_exit_loop:
for(int l = 0; l < num; ++l) pillar_node_number[l] = itemporary[indices_sort[l]];
for(int l = 0; l < num; ++l) rtemporary[l] = pillar_node_depth[l];
for(int l = 0; l < num; ++l) pillar_node_depth[l] = rtemporary[indices_sort[l]];
assert(std::is_sorted(&pillar_node_depth[0],&pillar_node_depth[num]));
//assert(std::is_sorted(&pillar_node_depth[0],&pillar_node_depth[num]));
//retrive pillar info
xmin = xyz[ECL_IJK_COORDS(i,j,0,0)];
xmax = xyz[ECL_IJK_COORDS(i,j,1,0)];
......@@ -1263,7 +1263,7 @@ ecl_exit_loop:
//then e array
for(int l = 0; l < (int)e.size(); ++l) itemporary[l] = e[l];
for(int l = 0; l < (int)e.size(); ++l) e[l] = itemporary[indices_sort[l]];
assert(std::is_sorted(b.begin(),b.end()));
//assert(std::is_sorted(b.begin(),b.end()));
} //l
//create edges
ElementArray<Edge> & p_edges = pillar_edges[i*(dims[1]+1)+j];
......@@ -1325,7 +1325,7 @@ ecl_exit_loop:
//then e array
for(int l = 0; l < (int)e.size(); ++l) itemporary[l] = e[l];
for(int l = 0; l < (int)e.size(); ++l) e[l] = itemporary[indices_sort[l]];
assert(std::is_sorted(b.begin(),b.end()));
//assert(std::is_sorted(b.begin(),b.end()));
}
//find out who shares each node along the pillar
for(int l = 0; l < num_nodes; ++l)
......@@ -1590,7 +1590,7 @@ ecl_exit_loop:
//then e array
for(int l = 0; l < (int)e.size(); ++l) temporary[l] = e[l];
for(int l = 0; l < (int)e.size(); ++l) e[l] = temporary[indices_sort[l]];
assert(std::is_sorted(b.begin(),b.end()));
//assert(std::is_sorted(b.begin(),b.end()));
}
//add vertical edges along pillars
ElementArray<Edge> & p0_edges = pillar_edges[(i+ 0)*(dims[1]+1)+j+0];
......@@ -1753,7 +1753,7 @@ ecl_exit_loop:
{
//move marked edges to the end
std::sort(bedges.begin(),bedges.end(),Mesh::PrivateMarkerComparator(this,outer));
assert(std::is_sorted(bedges.begin(),bedges.end(),Mesh::PrivateMarkerComparator(this,outer)));
//assert(std::is_sorted(bedges.begin(),bedges.end(),Mesh::PrivateMarkerComparator(this,outer)));
if( print_bedges )
{
std::cout << (m?"front ":"back ") << "depth " << k << " block " << ECL_IJK_DATA(blocki[m],blockj[m],k) << " edges [" << bedges.size() << "]:" << std::endl;
......@@ -2463,4 +2463,4 @@ ecl_exit_loop:
} //LoadECL
} //namespace
#endif
\ No newline at end of file
#endif
......@@ -27,10 +27,10 @@
#define R_QUIT 100
static int isnan(double x) { return x != x; }
static int __isnan__(double x) { return x != x; }
//static int isinf(double x) { return !isnan(x) && isnan(x - x); }
static int isinf(double x) { return fabs(x) > DBL_MAX; }
static int isbad(double x) { return isnan(x) || isinf(x); }
static int __isinf__(double x) { return fabs(x) > DBL_MAX; }
static int __isbad(double x) { return __isnan__(x) || __isinf__(x); }
template<typename T>
void ReadCoords(FILE * f,INMOST_DATA_REAL_TYPE c[3])
......@@ -352,7 +352,7 @@ safe_output:
for (unsigned int m = 0; m < comps; m++)
{
double val = static_cast<double>(arr[m]);
fprintf(f, "%14e ", isbad(val) ? -0.9999E30 : val);
fprintf(f, "%14e ", __isbad(val) ? -0.9999E30 : val);
}
}
else for (unsigned int m = 0; m < comps; m++) fprintf(f, "%14e ", -0.9999E30);
......@@ -379,7 +379,7 @@ safe_output:
for (unsigned int m = 0; m < comps; m++)
{
double val = static_cast<double>(arr[m].GetValue());
fprintf(f, "%14e ", isbad(val) ? -0.9999E30 : val);
fprintf(f, "%14e ", __isbad(val) ? -0.9999E30 : val);
}
}
else for (unsigned int m = 0; m < comps; m++) fprintf(f, "%14e ", -0.9999E30);
......@@ -429,7 +429,7 @@ safe_output:
for (unsigned int m = 0; m < comps; m++)
{
double val = static_cast<double>(arr[m].GetValue());
fprintf(f, "%14e ", isbad(val) ? -0.9999E30 : val);
fprintf(f, "%14e ", __isbad(val) ? -0.9999E30 : val);
}
}
else for (unsigned int m = 0; m < comps; m++) fprintf(f, "%14e ", -0.9999E30);
......@@ -494,7 +494,7 @@ safe_output:
for(unsigned int m = 0; m < comps; m++)
{
double val = static_cast<double>(arr[m]);
fprintf(f,"%14e ",(isbad(val) ? -0.9999E30 : val));
fprintf(f,"%14e ",(__isbad(val) ? -0.9999E30 : val));
}
fprintf(f,"\n");
}
......@@ -513,7 +513,7 @@ safe_output:
for(unsigned int m = 0; m < comps; m++)
{
double val = static_cast<double>(arr[m].GetValue());
fprintf(f,"%14e ",(isbad(val) ? -0.9999E30 : val));
fprintf(f,"%14e ",(__isbad(val) ? -0.9999E30 : val));
}
fprintf(f,"\n");
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment