Permalink
Browse files

Fix const-correctness in TTransaction et al

  • Loading branch information...
1 parent 98f5319 commit 053850b80c6b7d6dd0d57f6f61c48a12a631c1e6 @andyparkins committed Aug 5, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/lib/transactions.h
View
@@ -238,9 +238,9 @@ class TTransaction
virtual const TBitcoinHash &getHash() const = 0;
// virtual void putOutput( unsigned int, TCoinTransfer * ) = 0;
- virtual TCoinTransfer *getOutput( unsigned int ) const = 0;
+ virtual const TCoinTransfer *getOutput( unsigned int ) const = 0;
// virtual bool outputExists( unsigned int ) const = 0;
- virtual TCoinTransfer *getInput( unsigned int ) const = 0;
+ virtual const TCoinTransfer *getInput( unsigned int ) const = 0;
virtual TCoinTransfer *createOutput( unsigned int ) = 0;
@@ -271,8 +271,8 @@ class TMessageBasedTransaction : public TTransaction
const TBitcoinHash &getHash() const;
- TCoinTransfer *getOutput( unsigned int i ) const { return Outputs.find(i)->second; }
- TCoinTransfer *getInput( unsigned int i ) const { return Inputs.find(i)->second; }
+ const TCoinTransfer *getOutput( unsigned int i ) const { return Outputs.find(i)->second; }
+ const TCoinTransfer *getInput( unsigned int i ) const { return Inputs.find(i)->second; }
TCoinTransfer *createOutput( unsigned int );

0 comments on commit 053850b

Please sign in to comment.