mirror of
				https://github.com/Zygo/bees.git
				synced 2025-11-03 19:50:34 +01:00 
			
		
		
		
	string: drop vector_copy_struct, obsoleted by ByteVector
vector_copy_struct constructed a std::vector<uint8_t> from a fixed-size struct. ByteVector replaces std::vector<uint8_t> and has a template constructor which does the same thing as vector_copy_struct, so there is no longer a need for this function. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
		@@ -19,15 +19,6 @@ namespace crucible {
 | 
			
		||||
		memset(that, 0, sizeof(Base));
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// Copy a base class object (usually a C struct) into a vector<uint8_t>
 | 
			
		||||
	template <class Base>
 | 
			
		||||
	vector<uint8_t>
 | 
			
		||||
	vector_copy_struct(Base *that)
 | 
			
		||||
	{
 | 
			
		||||
		const uint8_t *begin_that = reinterpret_cast<const uint8_t *>(static_cast<const Base *>(that));
 | 
			
		||||
		return vector<uint8_t>(begin_that, begin_that + sizeof(Base));
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// int->hex conversion with sprintf
 | 
			
		||||
	string to_hex(uint64_t i);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user