Narrower scope working around MSC bug

This commit is contained in:
Rory OConnell
2020-06-26 21:16:17 -07:00
parent db296e9593
commit b8d896e56a
+5 -5
View File
@@ -210,18 +210,18 @@ random_m_srand(mrb_state *mrb, mrb_value self)
* Shuffles elements in self in place.
*/
#if defined _MSC_VER && _MSC_VER >= 1900
#pragma optimize( "", off )
#endif
static mrb_value
mrb_ary_shuffle_bang(mrb_state *mrb, mrb_value ary)
{
mrb_int i;
mrb_value max;
/*
* MSC compiler generating invalid instructions with optimization
* enabled
*/
mrb_int i;
mrb_value max;
#if defined _MSC_VER && _MSC_VER >= 1923
volatile
#endif
mrb_value r = mrb_nil_value();
rand_state *random;