[前][次][番号順一覧][スレッド一覧]

ruby-changes:45484

From: ko1 <ko1@a...>
Date: Tue, 7 Feb 2017 13:14:31 +0900 (JST)
Subject: [ruby-changes:45484] ko1:r57557 (trunk): remove compare with enum value.

ko1	2017-02-07 13:14:25 +0900 (Tue, 07 Feb 2017)

  New Revision: 57557

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57557

  Log:
    remove compare with enum value.
    
    * vm_core.h (vm_block_handler_verify): some compilers warn about comparison
      with enum value and 0. Real assertion is in vm_block_handler_type() so
      we only need to call vm_block_handler_type() and the value should be TRUE.

  Modified files:
    trunk/vm_core.h
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 57556)
+++ vm_core.h	(revision 57557)
@@ -1271,7 +1271,7 @@ static inline int https://github.com/ruby/ruby/blob/trunk/vm_core.h#L1271
 vm_block_handler_verify(VALUE block_handler)
 {
     VM_ASSERT(block_handler == VM_BLOCK_HANDLER_NONE ||
-	      vm_block_handler_type(block_handler) >= 0);
+	      (vm_block_handler_type(block_handler), TRUE));
     return 1;
 }
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]