mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-30 17:56:39 +00:00 
			
		
		
		
	Mostly to avoid string literal lookup by index with iteration over all preciding literals and calling strlen. This is very inefficient. In genral this makes code much more straightforward but also makes it portable since now int and float of different sizes are properly supported.
		
			
				
	
	
		
			20 lines
		
	
	
	
		
			397 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
	
		
			397 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #ifndef OPENMW_COMPONENTS_INTERPRETER_PROGRAM_H
 | |
| #define OPENMW_COMPONENTS_INTERPRETER_PROGRAM_H
 | |
| 
 | |
| #include "types.hpp"
 | |
| 
 | |
| #include <string>
 | |
| #include <vector>
 | |
| 
 | |
| namespace Interpreter
 | |
| {
 | |
|     struct Program
 | |
|     {
 | |
|         std::vector<Type_Code> mInstructions;
 | |
|         std::vector<Type_Integer> mIntegers;
 | |
|         std::vector<Type_Float> mFloats;
 | |
|         std::vector<std::string> mStrings;
 | |
|     };
 | |
| }
 | |
| 
 | |
| #endif
 |