Merge topic 'remove_boost_lexical_cast'

5ec273aa Remove all occurrences of boost::lexical_cast from vtk-m.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !590
This commit is contained in:
Robert Maynard 2016-10-21 08:32:33 -04:00 committed by Kitware Robot
commit b57067c6ab
2 changed files with 7 additions and 15 deletions

@ -32,10 +32,6 @@
#include <string>
#include <stdexcept>
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/lexical_cast.hpp>
VTKM_THIRDPARTY_POST_INCLUDE
typedef vtkm::Vec<vtkm::Float32, 3> FloatVec3;
@ -62,7 +58,7 @@ int main(int argc, char *argv[])
input.GetField(argv[2]) :
input.GetField(0);
vtkm::Float32 clipValue = boost::lexical_cast<vtkm::Float32>(argv[argc - 2]);
vtkm::Float32 clipValue = std::stof(argv[argc - 2]);
vtkm::worklet::Clip clip;
vtkm::cont::Timer<DeviceAdapter> total;

@ -33,10 +33,6 @@
#include <vtkm/cont/DataSet.h>
#include <vtkm/io/ErrorIO.h>
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/lexical_cast.hpp>
VTKM_THIRDPARTY_POST_INCLUDE
#include <algorithm>
#include <fstream>
#include <string>
@ -453,9 +449,9 @@ private:
{
try
{
numComponents = boost::lexical_cast<vtkm::IdComponent>(tag);
numComponents = std::stoi(tag);
}
catch (boost::bad_lexical_cast &)
catch (std::invalid_argument &)
{
internal::parseAssert(false);
}
@ -600,15 +596,15 @@ protected:
vtkm::IdComponent numComponents)
{
// string is unsupported for SkipDynamicArray, so it requires some
// special handling
// special handling
if(dataType == "string")
{
const vtkm::Id stringCount =
const vtkm::Id stringCount =
numComponents * static_cast<vtkm::Id>(numElements);
for(vtkm::Id i = 0; i < stringCount; ++i)
{
std::string trash;
this->DataFile->Stream >> trash;
this->DataFile->Stream >> trash;
}
}
else
@ -617,7 +613,7 @@ protected:
vtkm::io::internal::SelectTypeAndCall(typeId, numComponents,
SkipDynamicArray(this, numElements));
}
}
void DoReadDynamicArray(std::string dataType, std::size_t numElements,