-// Copyright (C) 2013-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// -------------------------------------------------------
Field::Field(const XAO::Dimension& dimension,
- const int& nbElements, const int& nbComponents, const std::string& name)
- : m_name(name), m_dimension(dimension), m_nbElements(nbElements), m_nbComponents(nbComponents)
+ const int& nbElements, const int& nbComponents, const std::string& name)
+ : m_name(name), m_dimension(dimension),
+ m_nbComponents(nbComponents), m_components(nbComponents, ""),
+ m_nbElements(nbElements)
{
- m_components.reserve(nbComponents);
- for (int i = 0; i < nbComponents; ++i)
- m_components.push_back("");
}
Field::~Field()
{
- for (unsigned int i = 0; i < m_steps.size(); ++i)
- delete m_steps[i];
+ for (unsigned int i = 0; i < m_steps.size(); ++i)
+ delete m_steps[i];
}
Field* Field::createField(const XAO::Type& type, const XAO::Dimension& dimension,
{
for (unsigned int i = 0; i < names.size(); ++i)
{
- if (i < m_nbComponents)
+ if ((int)i < m_nbComponents)
m_components[i] = names[i];
}
}
void Field::checkStepIndex(const int& step)
throw (XAO_Exception)
{
- if (step < m_steps.size() && step >= 0)
+ if (step < (int)m_steps.size() && step >= 0)
return;
throw XAO_Exception(MsgBuilder() << "Step index is out of range [0, "