fix SpaceType::NONE outRange size
This commit is contained in:
parent
8db40f0610
commit
60ceb6e9a1
1 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
#include "map_range.h"
|
#include "map_range.h"
|
||||||
//#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
namespace MultiArrayTools
|
namespace MultiArrayTools
|
||||||
{
|
{
|
||||||
|
@ -398,11 +398,11 @@ namespace MultiArrayTools
|
||||||
template <class MapF, class ORType>
|
template <class MapF, class ORType>
|
||||||
static void mk(std::shared_ptr<ORType>& outRange, MultiArray<size_t,ORType>& mapMult, const MapF& mapf)
|
static void mk(std::shared_ptr<ORType>& outRange, MultiArray<size_t,ORType>& mapMult, const MapF& mapf)
|
||||||
{
|
{
|
||||||
//static_assert( std::is_same<size_t,typename MapF::value_type>::value,
|
static_assert( std::is_same<size_t,typename MapF::value_type>::value,
|
||||||
// "out range value type for NONE must be size_t" );
|
"out range value type for NONE must be size_t" );
|
||||||
size_t max = 0;
|
size_t max = 0;
|
||||||
for(auto ii = mapf.begin(); ii.max() != ii.pos(); ++ii) {
|
for(auto ii = mapf.begin(); ii.max() != ii.pos(); ++ii) {
|
||||||
max = mapf[ii] > max ? mapf[ii]+1 : max;
|
max = mapf[ii]+1 > max ? mapf[ii]+1 : max;
|
||||||
}
|
}
|
||||||
std::vector<size_t> mult(max,0);
|
std::vector<size_t> mult(max,0);
|
||||||
for(auto ii = mapf.begin(); ii.max() != ii.pos(); ++ii) {
|
for(auto ii = mapf.begin(); ii.max() != ii.pos(); ++ii) {
|
||||||
|
|
Loading…
Reference in a new issue