summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-02-03 00:26:02 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2019-02-03 00:26:02 +0000
commit5980a3376678d6695ac0961e863a55c6ab52a30a (patch)
treee1067ca53fcd32194c579829ad9a94e7adc67869
parentRemove some naked new (diff)
downloadslicer-5980a3376678d6695ac0961e863a55c6ab52a30a.tar.bz2
slicer-5980a3376678d6695ac0961e863a55c6ab52a30a.tar.xz
slicer-5980a3376678d6695ac0961e863a55c6ab52a30a.zip
Remove unnecessary calls to .string()
-rw-r--r--slicer/json/serializer.cpp4
-rw-r--r--slicer/tool/parser.cpp4
-rw-r--r--slicer/xml/serializer.cpp4
3 files changed, 6 insertions, 6 deletions
diff --git a/slicer/json/serializer.cpp b/slicer/json/serializer.cpp
index 24cc746..681c8fb 100644
--- a/slicer/json/serializer.cpp
+++ b/slicer/json/serializer.cpp
@@ -343,7 +343,7 @@ namespace Slicer {
void
JsonFileDeserializer::Deserialize(ModelPartForRootPtr modelRoot)
{
- std::ifstream inFile(path.string());
+ std::ifstream inFile(path);
json::Value obj = json::parseValue(inFile);
auto mp = modelRoot->GetAnonChild();
std::visit(DocumentTreeIterate(mp), obj);
@@ -354,7 +354,7 @@ namespace Slicer {
{
json::Value doc;
modelRoot->OnEachChild(std::bind(&JsonSerializer::ModelTreeIterateRoot, &doc, _2));
- std::ofstream outFile(path.string());
+ std::ofstream outFile(path);
json::serializeValue(doc, outFile, "utf-8");
}
diff --git a/slicer/tool/parser.cpp b/slicer/tool/parser.cpp
index c712589..0aa0040 100644
--- a/slicer/tool/parser.cpp
+++ b/slicer/tool/parser.cpp
@@ -586,7 +586,7 @@ namespace Slicer {
args.push_back("-I" + include.string());
}
- Slice::PreprocessorPtr icecpp = Slice::Preprocessor::create("slicer", slicePath.string(), args);
+ Slice::PreprocessorPtr icecpp = Slice::Preprocessor::create("slicer", slicePath, args);
FILE * cppHandle = icecpp->preprocess(false);
if (cppHandle == NULL) {
@@ -595,7 +595,7 @@ namespace Slicer {
Slice::UnitPtr u = Slice::Unit::createUnit(false, false, false, false);
- int parseStatus = u->parse(slicePath.string(), cppHandle, false);
+ int parseStatus = u->parse(slicePath, cppHandle, false);
if (!icecpp->close()) {
throw CompilerError("preprocess close failed");
diff --git a/slicer/xml/serializer.cpp b/slicer/xml/serializer.cpp
index bcc291a..b00c5e3 100644
--- a/slicer/xml/serializer.cpp
+++ b/slicer/xml/serializer.cpp
@@ -416,7 +416,7 @@ namespace Slicer {
void
XmlFileDeserializer::Deserialize(ModelPartForRootPtr modelRoot)
{
- xmlpp::DomParser dom(path.string());
+ xmlpp::DomParser dom(path);
auto doc = dom.get_document();
DocumentTreeIterate(doc, modelRoot);
}
@@ -426,7 +426,7 @@ namespace Slicer {
{
xmlpp::Document doc;
modelRoot->OnEachChild(std::bind(&XmlSerializer::ModelTreeIterateRoot, &doc, _1, _2));
- doc.write_to_file_formatted(path.string());
+ doc.write_to_file_formatted(path);
}
XmlDocumentSerializer::XmlDocumentSerializer(xmlpp::Document * & d) :