Cache compression type in WIMStruct and wim_lookup_table_entry
[wimlib] / src / swm.c
index 58e594f879eaa2cbb57354830133e68d4338ed45..19452db1cf34904899c8fa67385566e7295210a6 100644 (file)
--- a/src/swm.c
+++ b/src/swm.c
@@ -137,7 +137,7 @@ verify_swm_set(WIMStruct *w, WIMStruct **additional_swms,
 
        /* keep track of ctype and guid just to make sure they are the same for
         * all the WIMs. */
-       ctype = wimlib_get_compression_type(w);
+       ctype = w->compression_type;
        guid = w->hdr.guid;
 
        {
@@ -151,7 +151,7 @@ verify_swm_set(WIMStruct *w, WIMStruct **additional_swms,
 
                        WIMStruct *swm = additional_swms[i];
 
-                       if (wimlib_get_compression_type(swm) != ctype) {
+                       if (swm->compression_type != ctype) {
                                ERROR("The split WIMs do not all have the same "
                                      "compression type");
                                return WIMLIB_ERR_SPLIT_INVALID;