Import Geant4 10.3.0 source tree
This commit is contained in:
@@ -115,8 +115,8 @@ public:
|
||||
}
|
||||
|
||||
bool is_attribute(const std::string& a_name) const {
|
||||
unsigned int number = m_atbs.size();
|
||||
for(unsigned int index=0;index<number;index++) {
|
||||
size_t number = m_atbs.size();
|
||||
for(size_t index=0;index<number;index++) {
|
||||
if(m_atbs[index].first==a_name) return true;
|
||||
}
|
||||
return false;
|
||||
@@ -129,8 +129,8 @@ public:
|
||||
|
||||
bool attribute_value(const std::string& a_atb,std::string& a_value) const {
|
||||
a_value.clear();
|
||||
unsigned int linen = m_atbs.size();
|
||||
for(unsigned int count=0;count<linen;count++) {
|
||||
size_t linen = m_atbs.size();
|
||||
for(size_t count=0;count<linen;count++) {
|
||||
if(m_atbs[count].first==a_atb) {
|
||||
a_value = m_atbs[count].second;
|
||||
return true;
|
||||
@@ -160,8 +160,8 @@ public:
|
||||
bool remove_attribute(const std::string& a_name){
|
||||
//TOOLS_STL : to be checked :
|
||||
std::vector<atb>::iterator it = m_atbs.begin();
|
||||
unsigned int linen = m_atbs.size();
|
||||
for(unsigned int count=0;count<linen;count++,++it) {
|
||||
size_t linen = m_atbs.size();
|
||||
for(size_t count=0;count<linen;count++,++it) {
|
||||
if(m_atbs[count].first==a_name) {
|
||||
m_atbs.erase(it);
|
||||
return true; //Found and removed.
|
||||
@@ -202,8 +202,8 @@ public:
|
||||
<< " dataInt : " << m_data_int
|
||||
<< std::endl;
|
||||
|
||||
{unsigned int atbn = m_atbs.size();
|
||||
for(unsigned int index=0;index<atbn;index++) {
|
||||
{size_t atbn = m_atbs.size();
|
||||
for(size_t index=0;index<atbn;index++) {
|
||||
a_out << " attribute : " << sout(m_atbs[index].first) << " "
|
||||
<< sout(m_atbs[index].second) << std::endl;
|
||||
}}
|
||||
@@ -323,8 +323,8 @@ public:
|
||||
empty_visitor* visitor = (empty_visitor*)a_tag;
|
||||
|
||||
{const std::vector<atb>& atbs = a_tree.attributes();
|
||||
unsigned int atbn = atbs.size();
|
||||
for(unsigned int index=0;index<atbn;index++) {
|
||||
size_t atbn = atbs.size();
|
||||
for(size_t index=0;index<atbn;index++) {
|
||||
const std::string& atb = atbs[index].first;
|
||||
const std::string& atbv = atbs[index].second;
|
||||
if(atbv.empty()) {
|
||||
@@ -339,8 +339,8 @@ public:
|
||||
{tools_lforcit(ielem*,a_tree.m_childs,it) {
|
||||
if(element* _elem = id_cast<ielem,element>(*(*it))) {
|
||||
const std::vector<atb>& atbs = _elem->attributes();
|
||||
unsigned int atbn = atbs.size();
|
||||
for(unsigned int index=0;index<atbn;index++) {
|
||||
size_t atbn = atbs.size();
|
||||
for(size_t index=0;index<atbn;index++) {
|
||||
const std::string& atb = atbs[index].first;
|
||||
const std::string& atbv = atbs[index].second;
|
||||
if(atbv.empty()) {
|
||||
@@ -403,7 +403,7 @@ public:
|
||||
}
|
||||
|
||||
tree* find_item(const std::string& a_name) const {
|
||||
{unsigned int linen = m_atbs.size();
|
||||
{size_t linen = m_atbs.size();
|
||||
for(unsigned int count=0;count<linen;count++) {
|
||||
if(m_atbs[count].first=="name") {
|
||||
if(m_atbs[count].second==a_name) return const_cast<tree*>(this);
|
||||
@@ -524,8 +524,8 @@ public:
|
||||
|
||||
void replace(const std::string& a_old,const std::string& a_new) {
|
||||
// Used by the obuild template system.
|
||||
{unsigned int atbn = m_atbs.size();
|
||||
for(unsigned int index=0;index<atbn;index++) {
|
||||
{size_t atbn = m_atbs.size();
|
||||
for(size_t index=0;index<atbn;index++) {
|
||||
std::string& value = m_atbs[index].second;
|
||||
tools::replace(value,a_old,a_new);
|
||||
}}
|
||||
@@ -628,8 +628,8 @@ public:
|
||||
|
||||
// begin tag :
|
||||
a_out << a_spaces << "<" << m_tag_name;
|
||||
{unsigned int atbn = m_atbs.size();
|
||||
for(unsigned int index=0;index<atbn;index++) {
|
||||
{size_t atbn = m_atbs.size();
|
||||
for(size_t index=0;index<atbn;index++) {
|
||||
a_out << " " << m_atbs[index].first << "="
|
||||
<< sout(m_atbs[index].second);
|
||||
}}
|
||||
@@ -643,8 +643,8 @@ public:
|
||||
bool isCallback = false;
|
||||
|
||||
a_out << a_spaces << " <" << _elem->name();
|
||||
unsigned int atbn = atbs.size();
|
||||
for(unsigned int index=0;index<atbn;index++) {
|
||||
size_t atbn = atbs.size();
|
||||
for(size_t index=0;index<atbn;index++) {
|
||||
a_out << " " << atbs[index].first << "="
|
||||
<< sout(atbs[index].second);
|
||||
if(atbs[index].first=="exec") isCallback = true;
|
||||
@@ -663,7 +663,7 @@ public:
|
||||
tools::replace(value,"@OnX@","\\n\\\n");
|
||||
tools::strip(value,tools::trailing,' ');
|
||||
a_out << value;
|
||||
unsigned int l = value.size();
|
||||
size_t l = value.size();
|
||||
if(l && value[l-1]!='\n') a_out << std::endl;
|
||||
a_out << a_spaces << " ";
|
||||
}
|
||||
@@ -682,8 +682,8 @@ public:
|
||||
const std::string& a_atb,
|
||||
const std::string& a_value,int a_index = 0){
|
||||
if(a_elem.empty()) {
|
||||
unsigned int linen = m_atbs.size();
|
||||
for(unsigned int count=0;count<linen;count++) {
|
||||
size_t linen = m_atbs.size();
|
||||
for(size_t count=0;count<linen;count++) {
|
||||
if(m_atbs[count].first==a_atb) {
|
||||
m_atbs[count].second = a_value;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user