1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-16 23:07:05 +01:00

minor serial IO fixes, XML now issues warning when trying to read absent nodes, these becomes

This commit is contained in:
2017-12-01 19:44:07 +00:00
parent 25f73018f4
commit 2427a21428
4 changed files with 41 additions and 18 deletions

View File

@ -39,6 +39,7 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
#include <cassert>
#include <Grid/pugixml/pugixml.h>
#include <Grid/GridCore.h>
namespace Grid
{
@ -119,7 +120,6 @@ namespace Grid
std::string buf;
readDefault(s, buf);
// std::cout << s << " " << buf << std::endl;
fromString(output, buf);
}
@ -132,7 +132,13 @@ namespace Grid
std::string buf;
unsigned int i = 0;
push(s);
if (!push(s))
{
std::cout << GridLogWarning << "XML: cannot open node '" << s << "'";
std::cout << std::endl;
return;
}
while (node_.child("elem"))
{
output.resize(i + 1);