summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/Reference.cpp3
-rw-r--r--cpp/src/IcePatch2/Util.cpp12
2 files changed, 7 insertions, 8 deletions
diff --git a/cpp/src/Ice/Reference.cpp b/cpp/src/Ice/Reference.cpp
index 7c58f93e5f9..520da18227b 100644
--- a/cpp/src/Ice/Reference.cpp
+++ b/cpp/src/Ice/Reference.cpp
@@ -499,6 +499,9 @@ string
IceInternal::FixedReference::toString() const
{
throw MarshalException(__FILE__, __LINE__, "Cannot marshal a fixed proxy");
+
+ assert(false); // Cannot be reached.
+ return string(); // To keep the compiler from complaining.
}
ConnectionIPtr
diff --git a/cpp/src/IcePatch2/Util.cpp b/cpp/src/IcePatch2/Util.cpp
index a4f6ef87998..d3e237eb250 100644
--- a/cpp/src/IcePatch2/Util.cpp
+++ b/cpp/src/IcePatch2/Util.cpp
@@ -309,10 +309,8 @@ IcePatch2::getSuffix(const string& pa)
{
return string();
}
- else
- {
- return path.substr(dotPos + 1);
- }
+
+ return path.substr(dotPos + 1);
}
string
@@ -327,10 +325,8 @@ IcePatch2::getWithoutSuffix(const string& pa)
{
return path;
}
- else
- {
- return path.substr(0, dotPos);
- }
+
+ return path.substr(0, dotPos);
}
bool