summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/slice2cs/Gen.cpp3
-rw-r--r--cpp/src/slice2java/Gen.cpp5
2 files changed, 6 insertions, 2 deletions
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp
index 8c3c87d6621..9a095595d34 100644
--- a/cpp/src/slice2cs/Gen.cpp
+++ b/cpp/src/slice2cs/Gen.cpp
@@ -4877,7 +4877,8 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << nl << "_ice_delegate = (" << name << opIntfName << "_)del;";
_out << eb;
- _out << sp << nl << "public ";
+ _out << sp << nl <<"[Obsolete(\"This method is deprecated, use GetHashCode instead.\")]";
+ _out << nl << "public ";
if(!p->isInterface() || !p->isLocal())
{
_out << "override ";
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index 277e576c4ea..8135f0465ab 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -1547,7 +1547,10 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p)
if(p->isLocal())
{
- out << sp << nl << "public int" << nl << "ice_hash()";
+ out << sp << nl << "/**";
+ out << nl << " * @deprecated This method is deprecated, use hashCode instead.";
+ out << nl << " **/";
+ out << nl << "public int" << nl << "ice_hash()";
out << sb;
out << nl << "return hashCode();";
out << eb;