diff options
Diffstat (limited to 'TAO/tests/Simple/bank/Account_i.cpp')
-rw-r--r-- | TAO/tests/Simple/bank/Account_i.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/TAO/tests/Simple/bank/Account_i.cpp b/TAO/tests/Simple/bank/Account_i.cpp index 68f38cc4d17..b35ed2ad370 100644 --- a/TAO/tests/Simple/bank/Account_i.cpp +++ b/TAO/tests/Simple/bank/Account_i.cpp @@ -23,11 +23,7 @@ Account_i::Account_i (const char *name, Account_i::~Account_i (void) { - // @@ Make sure that you do a CORBA::string_free() on name_ when - // this exits. - - // @@ Make sure that you run Purify on your program when you've got - // it working. + CORBA::string_free (name_); } // Set the ORB pointer. @@ -50,16 +46,15 @@ void Account_i::deposit (CORBA::Float deposit, CORBA::Environment &env) { - balance_ = balance_ + deposit ; + balance_ += deposit; } void Account_i::withdraw (CORBA::Float withdrawl, CORBA::Environment &env) { - // @@ Here's where you'd handle the exception... if (balance_ >= withdrawl) - balance_ = balance_ - withdrawl; + balance_ -= withdrawl; else env.exception (new Bank::Account::Overdraft("Exception from server::Overdraft")); } |