aboutsummaryrefslogtreecommitdiffstats
path: root/solc/CommandLineInterface.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-04-10 19:48:41 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-04-10 19:49:47 +0800
commit623b8eb107a97861e3e7e0c13acee39c8d5f4075 (patch)
tree9a6b09990052496a078d8cb115db35629c8b7063 /solc/CommandLineInterface.cpp
parentfefb3fad6fa20b9c99dd987a7869c297b279032e (diff)
downloaddexon-solidity-623b8eb107a97861e3e7e0c13acee39c8d5f4075.tar.gz
dexon-solidity-623b8eb107a97861e3e7e0c13acee39c8d5f4075.tar.zst
dexon-solidity-623b8eb107a97861e3e7e0c13acee39c8d5f4075.zip
Pull out ReadFile from CompilerStack
Diffstat (limited to 'solc/CommandLineInterface.cpp')
-rw-r--r--solc/CommandLineInterface.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp
index 31f70272..f0b73152 100644
--- a/solc/CommandLineInterface.cpp
+++ b/solc/CommandLineInterface.cpp
@@ -630,11 +630,11 @@ bool CommandLineInterface::processInput()
return link();
}
- CompilerStack::ReadFileCallback fileReader = [this](string const& _path)
+ ReadFile::Callback fileReader = [this](string const& _path)
{
auto path = boost::filesystem::path(_path);
if (!boost::filesystem::exists(path))
- return CompilerStack::ReadFileResult{false, "File not found."};
+ return ReadFile::Result{false, "File not found."};
auto canonicalPath = boost::filesystem::canonical(path);
bool isAllowed = false;
for (auto const& allowedDir: m_allowedDirectories)
@@ -650,14 +650,14 @@ bool CommandLineInterface::processInput()
}
}
if (!isAllowed)
- return CompilerStack::ReadFileResult{false, "File outside of allowed directories."};
+ return ReadFile::Result{false, "File outside of allowed directories."};
else if (!boost::filesystem::is_regular_file(canonicalPath))
- return CompilerStack::ReadFileResult{false, "Not a valid file."};
+ return ReadFile::Result{false, "Not a valid file."};
else
{
auto contents = dev::contentsString(canonicalPath.string());
m_sourceCodes[path.string()] = contents;
- return CompilerStack::ReadFileResult{true, contents};
+ return ReadFile::Result{true, contents};
}
};