OSDN Git Service

tag_type構造体に関する修正
[hengband/hengband.git] / src / util.c
index 0c7d46a..b626282 100644 (file)
@@ -4853,14 +4853,9 @@ static void swap(tag_type *a, tag_type *b)
 {
        tag_type temp;
 
-       temp.tag = a->tag;
-       temp.pointer = a->pointer;
-
-       a->tag = b->tag;
-       a->pointer = b->pointer;
-
-       b->tag = temp.tag;
-       b->pointer = temp.pointer;
+       temp = *a;
+       *a = *b;
+       *b = temp;
 }