diff options
author | vishal <vishal@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-09-16 00:12:59 +0000 |
---|---|---|
committer | vishal <vishal@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-09-16 00:12:59 +0000 |
commit | 044e612dcbb068bdeb2feab77ddd284ed24869fb (patch) | |
tree | 5e70a0342788faa5d811c3f1e6dd2789c1fe159f /TAO/tests/Simple/bank/Account_i.cpp | |
parent | a0f2a0c58788e2ea568d653705895aa4cf20b45e (diff) | |
download | ATCD-044e612dcbb068bdeb2feab77ddd284ed24869fb.tar.gz |
*** empty log message ***
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")); } |