mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	Simplification of typeSupportedByOldABIEncoder
This commit is contained in:
		
							parent
							
								
									dc5cd3e1e7
								
							
						
					
					
						commit
						a5f0caa178
					
				| @ -41,15 +41,13 @@ bool typeSupportedByOldABIEncoder(Type const& _type) | ||||
| { | ||||
| 	if (_type.dataStoredIn(DataLocation::Storage)) | ||||
| 		return true; | ||||
| 	else if (_type.category() == Type::Category::Struct) | ||||
| 	if (_type.category() == Type::Category::Struct) | ||||
| 		return false; | ||||
| 	else if (_type.category() == Type::Category::Array) | ||||
| 	if (_type.category() == Type::Category::Array) | ||||
| 	{ | ||||
| 		auto const& arrayType = dynamic_cast<ArrayType const&>(_type); | ||||
| 		auto base = arrayType.baseType(); | ||||
| 		if (!typeSupportedByOldABIEncoder(*base)) | ||||
| 			return false; | ||||
| 		else if (base->category() == Type::Category::Array && base->isDynamicallySized()) | ||||
| 		if (!typeSupportedByOldABIEncoder(*base) || (base->category() == Type::Category::Array && base->isDynamicallySized())) | ||||
| 			return false; | ||||
| 	} | ||||
| 	return true; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user