update for PIP3
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
#define CDUTILS_C_H
|
||||
|
||||
#include "cdutils_interface.h"
|
||||
#include "cd_core_export.h"
|
||||
#include "cdutils_core.h"
|
||||
|
||||
|
||||
namespace CDUtils {
|
||||
|
||||
@@ -31,6 +31,7 @@ namespace CDUtils {
|
||||
|
||||
class CDCore;
|
||||
|
||||
typedef void (*Handler)(void*);
|
||||
|
||||
class CD_CORE_EXPORT __Core_Initializer__ {
|
||||
public:
|
||||
|
||||
@@ -63,8 +63,8 @@ PIVector<int> enumValues(const PIString & e, const PIMap<PIString, CDSection> &
|
||||
PIVector<int> ret;
|
||||
enames.clear();
|
||||
if (sections.contains(e)) {
|
||||
ret = sections[e].indexes();
|
||||
enames = sections[e].index_names();
|
||||
ret = sections.at(e).indexes();
|
||||
enames = sections.at(e).index_names();
|
||||
} else {
|
||||
int v = e.toInt();
|
||||
if (v < 2) return ret;
|
||||
|
||||
@@ -344,7 +344,7 @@ int CDSection::count(bool recursive) const {
|
||||
if (recursive) {
|
||||
PIMap<int, CDSection>::const_iterator i;
|
||||
for (i = s.constBegin(); i != s.constEnd(); ++i)
|
||||
ret += i->second.count(recursive);
|
||||
ret += i.value().count(recursive);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -127,11 +127,8 @@ public:
|
||||
bool test(int v) {return cd.value(v).toBool();}
|
||||
// CDType & operator [](int v) {if (!k.contains(v)) k[v].index_ = v; return k[v];}
|
||||
CDType & operator [](int v) {return cd[v];}
|
||||
const CDType operator [](int v) const {return cd[v];}
|
||||
CDType & operator [](const PIString & name_) {return getByName(name_);}
|
||||
const CDType operator [](const PIString & name_) const {return const_cast<CDSection*>(this)->getByName(name_);}
|
||||
CDType & operator [](const PIDeque<int> & path_) {return getByPath(path_);}
|
||||
const CDType operator [](const PIDeque<int> & path_) const {return const_cast<CDSection*>(this)->getByPath(path_);}
|
||||
CDSection & section(int v);
|
||||
const CDSection section(int v) const;
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ void GDockWidget::addX(const CDType & t) {
|
||||
void GDockWidget::drawX(const PIMap<PIString, PIVector<double> > & data) {
|
||||
for (int i = 0; i < x_list.size_s(); ++i) {
|
||||
PIString sp = CDCore::pathToString(x_list[i]);
|
||||
const PIVector<double> & ch(data[sp]);
|
||||
PIVector<double> ch(data.at(sp));
|
||||
for (int j = 0; j < ch.size_s(); ++j)
|
||||
graphic->graphic()->addPoint(ch[j], i, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user