mirror of https://github.com/CGAL/cgal
fix a warning caused by boost::dynamic_bitset<>
This commit is contained in:
parent
21082320e3
commit
abfc6d92c8
|
|
@ -163,11 +163,12 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<Function> funcs;
|
std::vector<Function> funcs;
|
||||||
std::vector<boost::dynamic_bitset<> > bmasks;
|
typedef boost::dynamic_bitset<std::size_t> Bmask;
|
||||||
|
std::vector<Bmask> bmasks;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& vf, const std::vector<std::vector<Sign> >& vps)
|
Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& vf, const std::vector<std::vector<Sign> >& vps)
|
||||||
: funcs(vf), bmasks(vps.size(), boost::dynamic_bitset<>(funcs.size() * 2, false))
|
: funcs(vf), bmasks(vps.size(), Bmask(funcs.size() * 2, false))
|
||||||
{
|
{
|
||||||
assert(funcs.size());
|
assert(funcs.size());
|
||||||
|
|
||||||
|
|
@ -178,9 +179,9 @@ public:
|
||||||
{
|
{
|
||||||
const std::vector<Sign>& mask = *mask_iter;
|
const std::vector<Sign>& mask = *mask_iter;
|
||||||
assert(funcs.size() == mask.size());
|
assert(funcs.size() == mask.size());
|
||||||
boost::dynamic_bitset<>& bmask = bmasks[mask_index++];
|
Bmask& bmask = bmasks[mask_index++];
|
||||||
|
|
||||||
typename boost::dynamic_bitset<>::size_type bit_index = 0;
|
typename Bmask::size_type bit_index = 0;
|
||||||
for (std::vector<Sign>::const_iterator iter = mask.begin(), endIter = mask.end(); iter != endIter; ++iter)
|
for (std::vector<Sign>::const_iterator iter = mask.begin(), endIter = mask.end(); iter != endIter; ++iter)
|
||||||
{
|
{
|
||||||
std::string::value_type character = *iter;
|
std::string::value_type character = *iter;
|
||||||
|
|
@ -201,15 +202,15 @@ public:
|
||||||
assert(funcs.size());
|
assert(funcs.size());
|
||||||
|
|
||||||
bmasks.reserve((1 << funcs.size()) - 1);
|
bmasks.reserve((1 << funcs.size()) - 1);
|
||||||
bmasks.push_back(boost::dynamic_bitset<>(std::string("10")));
|
bmasks.push_back(Bmask(std::string("10")));
|
||||||
bmasks.push_back(boost::dynamic_bitset<>(std::string("01")));
|
bmasks.push_back(Bmask(std::string("01")));
|
||||||
|
|
||||||
for (std::size_t i = 0; i < funcs.size()-1; ++i)
|
for (std::size_t i = 0; i < funcs.size()-1; ++i)
|
||||||
{
|
{
|
||||||
std::size_t c_size = bmasks.size();
|
std::size_t c_size = bmasks.size();
|
||||||
for (std::size_t index = 0; index < c_size; ++index)
|
for (std::size_t index = 0; index < c_size; ++index)
|
||||||
{
|
{
|
||||||
boost::dynamic_bitset<> aux = bmasks[index];
|
Bmask aux = bmasks[index];
|
||||||
aux.push_back(true);
|
aux.push_back(true);
|
||||||
aux.push_back(false);
|
aux.push_back(false);
|
||||||
bmasks.push_back(aux);
|
bmasks.push_back(aux);
|
||||||
|
|
@ -222,7 +223,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& vf, const std::vector<std::string>& vps)
|
Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& vf, const std::vector<std::string>& vps)
|
||||||
: funcs(vf), bmasks(vps.size(), boost::dynamic_bitset<>(funcs.size() * 2, false))
|
: funcs(vf), bmasks(vps.size(), Bmask(funcs.size() * 2, false))
|
||||||
{
|
{
|
||||||
assert(funcs.size());
|
assert(funcs.size());
|
||||||
|
|
||||||
|
|
@ -233,9 +234,9 @@ public:
|
||||||
{
|
{
|
||||||
const std::string& mask_str = *mask_iter;
|
const std::string& mask_str = *mask_iter;
|
||||||
assert(funcs.size() == mask_str.length());
|
assert(funcs.size() == mask_str.length());
|
||||||
boost::dynamic_bitset<>& bmask = bmasks[mask_index++];
|
Bmask& bmask = bmasks[mask_index++];
|
||||||
|
|
||||||
typename boost::dynamic_bitset<>::size_type bit_index = 0;
|
typename Bmask::size_type bit_index = 0;
|
||||||
for (std::string::const_iterator iter = mask_str.begin(), endIter = mask_str.end(); iter != endIter; ++iter)
|
for (std::string::const_iterator iter = mask_str.begin(), endIter = mask_str.end(); iter != endIter; ++iter)
|
||||||
{
|
{
|
||||||
std::string::value_type character = *iter;
|
std::string::value_type character = *iter;
|
||||||
|
|
@ -252,7 +253,7 @@ public:
|
||||||
|
|
||||||
return_type operator() (const Point_3& p, const bool = true) const
|
return_type operator() (const Point_3& p, const bool = true) const
|
||||||
{
|
{
|
||||||
boost::dynamic_bitset<> bmask(funcs.size() * 2, false);
|
Bmask bmask(funcs.size() * 2, false);
|
||||||
|
|
||||||
std::size_t i = 0;
|
std::size_t i = 0;
|
||||||
for (typename std::vector<Function>::const_iterator iter = funcs.begin(), endIter = funcs.end();
|
for (typename std::vector<Function>::const_iterator iter = funcs.begin(), endIter = funcs.end();
|
||||||
|
|
@ -268,7 +269,7 @@ public:
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<boost::dynamic_bitset<> >::const_iterator iter = std::lower_bound(bmasks.begin(), bmasks.end(), bmask);
|
std::vector<Bmask>::const_iterator iter = std::lower_bound(bmasks.begin(), bmasks.end(), bmask);
|
||||||
if (iter != bmasks.end() && *iter == bmask)
|
if (iter != bmasks.end() && *iter == bmask)
|
||||||
return static_cast<return_type>(1 + (iter - bmasks.begin()));
|
return static_cast<return_type>(1 + (iter - bmasks.begin()));
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue