mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	Merge pull request #100 from LianaHus/use_throw_in_action_registrar
used throw statement instead of __throw()
This commit is contained in:
		
						commit
						3ff932c872
					
				| @ -118,7 +118,7 @@ contract GlobalRegistrar is Registrar, AuctionSystem { | |||||||
| 
 | 
 | ||||||
| 	function() { | 	function() { | ||||||
| 		// prevent people from just sending funds to the registrar
 | 		// prevent people from just sending funds to the registrar
 | ||||||
| 		__throw(); | 		throw; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	function onAuctionEnd(string _name) internal { | 	function onAuctionEnd(string _name) internal { | ||||||
| @ -135,19 +135,19 @@ contract GlobalRegistrar is Registrar, AuctionSystem { | |||||||
| 
 | 
 | ||||||
| 	function reserve(string _name) external { | 	function reserve(string _name) external { | ||||||
| 		if (bytes(_name).length == 0) | 		if (bytes(_name).length == 0) | ||||||
| 			__throw(); | 			throw; | ||||||
| 		bool needAuction = requiresAuction(_name); | 		bool needAuction = requiresAuction(_name); | ||||||
| 		if (needAuction) | 		if (needAuction) | ||||||
| 		{ | 		{ | ||||||
| 			if (now < m_toRecord[_name].renewalDate) | 			if (now < m_toRecord[_name].renewalDate) | ||||||
| 				__throw(); | 				throw; | ||||||
| 			bid(_name, msg.sender, msg.value); | 			bid(_name, msg.sender, msg.value); | ||||||
| 		} | 		} | ||||||
| 		else | 		else | ||||||
| 		{ | 		{ | ||||||
| 			Record record = m_toRecord[_name]; | 			Record record = m_toRecord[_name]; | ||||||
| 			if (record.owner != 0) | 			if (record.owner != 0) | ||||||
| 				__throw(); | 				throw; | ||||||
| 			m_toRecord[_name].owner = msg.sender; | 			m_toRecord[_name].owner = msg.sender; | ||||||
| 			Changed(_name); | 			Changed(_name); | ||||||
| 		} | 		} | ||||||
| @ -210,11 +210,6 @@ contract GlobalRegistrar is Registrar, AuctionSystem { | |||||||
| 	function content(string _name) constant returns (bytes32) { return m_toRecord[_name].content; } | 	function content(string _name) constant returns (bytes32) { return m_toRecord[_name].content; } | ||||||
| 	function name(address _addr) constant returns (string o_name) { return m_toName[_addr]; } | 	function name(address _addr) constant returns (string o_name) { return m_toName[_addr]; } | ||||||
| 
 | 
 | ||||||
| 	function __throw() internal { |  | ||||||
| 		// workaround until we have "throw"
 |  | ||||||
| 		uint[] x; x[1]; |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| 	mapping (address => string) m_toName; | 	mapping (address => string) m_toName; | ||||||
| 	mapping (string => Record) m_toRecord; | 	mapping (string => Record) m_toRecord; | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user