aboutsummaryrefslogtreecommitdiff
path: root/paludis/resolver/required_confirmations.cc
diff options
context:
space:
mode:
authorAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2013-02-24 19:27:49 -0800
committerAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2013-03-02 08:59:13 -0800
commitc688a4d80b8283dc35e032d24086205c01a0b2c9 (patch)
treee19023be8c3365c0c566d9a6e7021f6b607b386e /paludis/resolver/required_confirmations.cc
parent0ce8ee0e8a9109d043697b7e3402fe12d7ee7542 (diff)
downloadpaludis-c688a4d80b8283dc35e032d24086205c01a0b2c9.tar.gz
paludis-c688a4d80b8283dc35e032d24086205c01a0b2c9.tar.xz
remove unexecuted statements
This reworks some idiom usage to avoid unexecutable statements. This is a code cleanup of locations flagged by the clang parser. No functionality change is intended.
Diffstat (limited to 'paludis/resolver/required_confirmations.cc')
-rw-r--r--paludis/resolver/required_confirmations.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/paludis/resolver/required_confirmations.cc b/paludis/resolver/required_confirmations.cc
index 66a424fb4..d8d934398 100644
--- a/paludis/resolver/required_confirmations.cc
+++ b/paludis/resolver/required_confirmations.cc
@@ -28,8 +28,6 @@ using namespace paludis::resolver;
const std::shared_ptr<RequiredConfirmation>
RequiredConfirmation::deserialise(Deserialisation & d)
{
- std::shared_ptr<RequiredConfirmation> result;
-
if (d.class_name() == "DowngradeConfirmation")
return DowngradeConfirmation::deserialise(d);
else if (d.class_name() == "NotBestConfirmation")
@@ -42,10 +40,9 @@ RequiredConfirmation::deserialise(Deserialisation & d)
return MaskedConfirmation::deserialise(d);
else if (d.class_name() == "ChangedChoicesConfirmation")
return ChangedChoicesConfirmation::deserialise(d);
- else
- throw InternalError(PALUDIS_HERE, "unknown class '" + stringify(d.class_name()) + "'");
- return result;
+ throw InternalError(PALUDIS_HERE,
+ "unknown class '" + stringify(d.class_name()) + "'");
}
const std::shared_ptr<DowngradeConfirmation>