remove std:: from vector,unique_ptr,make_unique,array

This commit is contained in:
Gavin Ridley 2021-04-22 16:46:23 -04:00
parent 2af4c9cd92
commit ad4e1c9f4a
129 changed files with 1013 additions and 1033 deletions

View file

@ -4,12 +4,13 @@
#include <cstddef> // for size_t
#include <sstream> // for stringstream
#include <string>
#include <vector>
#include "pugixml.hpp"
#include "xtensor/xarray.hpp"
#include "xtensor/xadapt.hpp"
#include "openmc/vector.h"
namespace openmc {
inline bool
@ -23,9 +24,9 @@ std::string get_node_value(pugi::xml_node node, const char* name,
bool get_node_value_bool(pugi::xml_node node, const char* name);
template <typename T>
std::vector<T> get_node_array(pugi::xml_node node, const char* name,
bool lowercase=false)
template<typename T>
vector<T> get_node_array(
pugi::xml_node node, const char* name, bool lowercase = false)
{
// Get value of node attribute/child
std::string s {get_node_value(node, name, lowercase)};
@ -33,7 +34,7 @@ std::vector<T> get_node_array(pugi::xml_node node, const char* name,
// Read values one by one into vector
std::stringstream iss {s};
T value;
std::vector<T> values;
vector<T> values;
while (iss >> value)
values.push_back(value);
@ -44,8 +45,8 @@ template <typename T>
xt::xarray<T> get_node_xarray(pugi::xml_node node, const char* name,
bool lowercase=false)
{
std::vector<T> v = get_node_array<T>(node, name, lowercase);
std::vector<std::size_t> shape = {v.size()};
vector<T> v = get_node_array<T>(node, name, lowercase);
vector<std::size_t> shape = {v.size()};
return xt::adapt(v, shape);
}