aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Kotewicz <marek.kotewicz@gmail.com>2014-12-11 19:39:39 +0800
committerMarek Kotewicz <marek.kotewicz@gmail.com>2014-12-11 19:39:39 +0800
commit8f53101f6f81260bf172495900c68cb7150974a9 (patch)
treea22573827e10dfba24044c2e780fba534cf6ae46
parentbea34ab0730c483e9b9b2465ea3b2e1b8186ef01 (diff)
parent5cd7c1fc9a0ace8750a55806c07a1356437348b6 (diff)
downloaddexon-solidity-8f53101f6f81260bf172495900c68cb7150974a9.tar
dexon-solidity-8f53101f6f81260bf172495900c68cb7150974a9.tar.gz
dexon-solidity-8f53101f6f81260bf172495900c68cb7150974a9.tar.bz2
dexon-solidity-8f53101f6f81260bf172495900c68cb7150974a9.tar.lz
dexon-solidity-8f53101f6f81260bf172495900c68cb7150974a9.tar.xz
dexon-solidity-8f53101f6f81260bf172495900c68cb7150974a9.tar.zst
dexon-solidity-8f53101f6f81260bf172495900c68cb7150974a9.zip
Merge branch 'macox_fixes' into build_enhancement
-rw-r--r--Types.cpp4
-rw-r--r--Types.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/Types.cpp b/Types.cpp
index d14311a2..6c971a74 100644
--- a/Types.cpp
+++ b/Types.cpp
@@ -52,7 +52,7 @@ shared_ptr<Type const> Type::fromElementaryTypeName(Token::Value _typeToken)
else if (_typeToken == Token::ADDRESS)
return make_shared<IntegerType const>(0, IntegerType::Modifier::ADDRESS);
else if (_typeToken == Token::BOOL)
- return shared_ptr<BoolType const>();
+ return make_shared<BoolType const>();
else
BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Unable to convert elementary typename " +
std::string(Token::toString(_typeToken)) + " to type."));
@@ -87,7 +87,7 @@ shared_ptr<Type const> Type::forLiteral(Literal const& _literal)
{
case Token::TRUE_LITERAL:
case Token::FALSE_LITERAL:
- return shared_ptr<BoolType const>();
+ return make_shared<BoolType const>();
case Token::NUMBER:
return IntegerType::smallestTypeForLiteral(_literal.getValue());
case Token::STRING_LITERAL:
diff --git a/Types.h b/Types.h
index 887a1ee1..718f347f 100644
--- a/Types.h
+++ b/Types.h
@@ -184,6 +184,7 @@ private:
class BoolType: public Type
{
public:
+ explicit BoolType() {}
virtual Category getCategory() const { return Category::BOOL; }
virtual bool isExplicitlyConvertibleTo(Type const& _convertTo) const override;
virtual bool acceptsBinaryOperator(Token::Value _operator) const override