]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/module.cpp
Use standard fixed-size integer types
[libs/gl.git] / source / core / module.cpp
index 601aae99c8952e355016562d4589e333cfbd2798..ed5f02823f0bf34671a7ee4a31e7dad4035f0dc9 100644 (file)
@@ -117,7 +117,7 @@ void SpirVModule::remap_pointers_from(const SpirVModule &other)
 
 void SpirVModule::load_code(IO::Base &io)
 {
 
 void SpirVModule::load_code(IO::Base &io)
 {
-       UInt32 buffer[1024];
+       uint32_t buffer[1024];
        while(1)
        {
                unsigned len = io.read(reinterpret_cast<char *>(buffer), sizeof(buffer));
        while(1)
        {
                unsigned len = io.read(reinterpret_cast<char *>(buffer), sizeof(buffer));
@@ -145,7 +145,7 @@ void SpirVModule::reflect()
 
        if(code[0]==SPIRV_MAGIC_REVERSED)
        {
 
        if(code[0]==SPIRV_MAGIC_REVERSED)
        {
-               for(UInt32 &c: code)
+               for(uint32_t &c: code)
                        c = ((c&0xFF)<<24) || ((c&0xFF00)<<8) | ((c>>8)&0xFF00) | ((c>>24)&0xFF);
        }
        else if(code[0]!=SPIRV_MAGIC)
                        c = ((c&0xFF)<<24) || ((c&0xFF00)<<8) | ((c>>8)&0xFF00) | ((c>>24)&0xFF);
        }
        else if(code[0]!=SPIRV_MAGIC)
@@ -291,7 +291,7 @@ SpirVModule::TypeInfo::TypeInfo():
 { }
 
 
 { }
 
 
-UInt32 SpirVModule::Reflection::get_opcode(UInt32 op)
+uint32_t SpirVModule::Reflection::get_opcode(uint32_t op)
 {
        return op&0xFFFF;
 }
 {
        return op&0xFFFF;
 }
@@ -323,7 +323,7 @@ string SpirVModule::Reflection::read_string(CodeIterator &op, const CodeIterator
        throw invalid_module("Unterminated SPIR-V string literal");
 }
 
        throw invalid_module("Unterminated SPIR-V string literal");
 }
 
-void SpirVModule::Reflection::reflect_code(const vector<UInt32> &code)
+void SpirVModule::Reflection::reflect_code(const vector<uint32_t> &code)
 {
        for(CodeIterator op=code.begin()+5; op!=code.end(); )
        {
 {
        for(CodeIterator op=code.begin()+5; op!=code.end(); )
        {