Previous 199869 Revisions Next

r41685 Wednesday 11th November, 2015 at 17:07:13 UTC by Miodrag Milanović
More cleanups (nw)
[src/devices/imagedev]floppy.cpp snapquik.cpp
[src/emu]config.cpp device.cpp emuopts.cpp hash.cpp hashfile.cpp rendfont.cpp validity.cpp
[src/emu/debug]debugvw.cpp
[src/emu/ui]filesel.cpp ui.cpp viewgfx.cpp

trunk/src/devices/imagedev/floppy.cpp
r250196r250197
685685{
686686   int spos = (buf.size() >> 1)-1;
687687   int step;
688   for(step=1; step<buf.size()+1; step<<=1);
688   for(step=1; step<buf.size()+1; step<<=1) { }
689689   step >>= 1;
690690
691691   for(;;) {
trunk/src/devices/imagedev/snapquik.cpp
r250196r250197
2020
2121snapshot_image_device::snapshot_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
2222   : device_t(mconfig, SNAPSHOT, "Snapshot", tag, owner, clock, "snapshot_image", __FILE__),
23      device_image_interface(mconfig, *this),
24      m_interface(NULL),
25      m_delay_attoseconds(0)
23     device_image_interface(mconfig, *this),
24     m_file_extensions(NULL),
25     m_interface(NULL),
26     m_delay_seconds(0),
27     m_delay_attoseconds(0),
28     m_timer(NULL)
2629{
2730}
2831
2932snapshot_image_device::snapshot_image_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
30      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
31      device_image_interface(mconfig, *this),
32      m_interface(NULL),
33      m_delay_attoseconds(0)
33   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
34   device_image_interface(mconfig, *this),
35   m_file_extensions(NULL),
36   m_interface(NULL),
37   m_delay_seconds(0),
38   m_delay_attoseconds(0),
39   m_timer(NULL)
3440{
3541}
3642//-------------------------------------------------
trunk/src/emu/config.cpp
r250196r250197
8686   newtype->save = save;
8787
8888   /* add us to the end */
89   for (ptype = &typelist; *ptype; ptype = &(*ptype)->next) ;
89   for (ptype = &typelist; *ptype; ptype = &(*ptype)->next) { }
9090   *ptype = newtype;
9191}
9292
trunk/src/emu/debug/debugvw.cpp
r250196r250197
441441debug_view *debug_view_manager::append(debug_view *view)
442442{
443443   debug_view **viewptr;
444   for (viewptr = &m_viewlist; *viewptr != NULL; viewptr = &(*viewptr)->m_next) ;
444   for (viewptr = &m_viewlist; *viewptr != NULL; viewptr = &(*viewptr)->m_next) { }
445445   *viewptr = view;
446446   return view;
447447}
trunk/src/emu/device.cpp
r250196r250197
853853      m_type(type)
854854{
855855   device_interface **tailptr;
856   for (tailptr = &device.m_interface_list; *tailptr != NULL; tailptr = &(*tailptr)->m_interface_next) ;
856   for (tailptr = &device.m_interface_list; *tailptr != NULL; tailptr = &(*tailptr)->m_interface_next) { }
857857   *tailptr = this;
858858}
859859
trunk/src/emu/emuopts.cpp
r250196r250197
290290         }
291291      }
292292   }
293   while (add_slot_options(false));
293   while (add_slot_options(false)) { }
294294   add_device_options(false);
295295}
296296
r250196r250197
359359bool emu_options::parse_slot_devices(int argc, char *argv[], std::string &error_string, const char *name, const char *value)
360360{
361361   // an initial parse to capture the initial set of values
362   bool result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
362   bool result;
363   
364   core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
363365
364366   // keep adding slot options until we stop seeing new stuff
365367   bool isfirstpass = true;
366368   while (add_slot_options(isfirstpass))
367369   {
368      result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
370      core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
369371      isfirstpass = false;
370372   }
371373
r250196r250197
373375   add_device_options(true);
374376   if (name != NULL && exists(name))
375377      set_value(name, value, OPTION_PRIORITY_CMDLINE, error_string);
376   result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
378   core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
377379
378   int num = 0;
380   int num;
379381   do {
380382      num = options_count();
381383      update_slot_options();
r250196r250197
528530
529531      // then add the options
530532      add_device_options(true);
531      int num = 0;
533      int num;
532534      do {
533535         num = options_count();
534536         update_slot_options();
trunk/src/emu/hash.cpp
r250196r250197
292292      // non-hex alpha values specify a hash type
293293      if (uc >= 'G' && uc <= 'Z')
294294      {
295         if (skip_digits != 0)
296            errors = true;
297295         skip_digits = 0;
298296         if (uc == HASH_CRC)
299297         {
trunk/src/emu/hashfile.cpp
r250196r250197
539539
540540bool read_hash_config(device_image_interface &image, const char *sysname, std::string &result)
541541{
542   hash_file *hashfile = NULL;
542   hash_file *hashfile;
543543   const hash_info *info;
544544
545545   /* open the hash file */
trunk/src/emu/rendfont.cpp
r250196r250197
510510            else if (strncmp(ptr, "BITMAP", 6) == 0)
511511            {
512512               // stash the raw pointer and scan for the end of the character
513               for (rawdata = ptr = next_line(ptr); ptr != NULL && strncmp(ptr, "ENDCHAR", 7) != 0; ptr = next_line(ptr)) ;
513               for (rawdata = ptr = next_line(ptr); ptr != NULL && strncmp(ptr, "ENDCHAR", 7) != 0; ptr = next_line(ptr)) { }
514514               break;
515515            }
516516         }
trunk/src/emu/ui/filesel.cpp
r250196r250197
271271   item_append("New Image Name:", new_image_name, 0, ITEMREF_NEW_IMAGE_NAME);
272272
273273   // do we support multiple formats?
274   format = m_image->formatlist();
274   if (ENABLE_FORMATS) format = m_image->formatlist();
275275   if (ENABLE_FORMATS && (format != NULL))
276276   {
277277      item_append("Image Format:", m_current_format->description(), 0, ITEMREF_FORMAT);
trunk/src/emu/ui/ui.cpp
r250196r250197
369369
370370      // clear the input memory
371371      machine().input().reset_polling();
372      while (machine().input().poll_switches() != INPUT_CODE_INVALID) ;
372      while (machine().input().poll_switches() != INPUT_CODE_INVALID) { }
373373
374374      // loop while we have a handler
375375      while (m_handler_callback != handler_ingame && !machine().scheduled_event_pending() && !ui_menu::stack_has_special_main_menu())
trunk/src/emu/ui/viewgfx.cpp
r250196r250197
192192            i < tempcount && state.gfxset.devcount < MAX_GFX_DECODERS;
193193            i++, interface = gfx_iter.next())
194194      {
195         for (count = 0; count < MAX_GFX_ELEMENTS && interface->gfx(count) != NULL; count++);
195         for (count = 0; count < MAX_GFX_ELEMENTS && interface->gfx(count) != NULL; count++) { }
196196
197197         // count = index of first NULL
198198         if (count > 0)
r250196r250197
10061006   pixelscale = state.tilemap.zoom;
10071007   if (pixelscale == 0)
10081008   {
1009      for (maxxscale = 1; mapwidth * (maxxscale + 1) < mapboxwidth; maxxscale++) ;
1010      for (maxyscale = 1; mapheight * (maxyscale + 1) < mapboxheight; maxyscale++) ;
1009      for (maxxscale = 1; mapwidth * (maxxscale + 1) < mapboxwidth; maxxscale++) { }
1010      for (maxyscale = 1; mapheight * (maxyscale + 1) < mapboxheight; maxyscale++) { }
10111011      pixelscale = MIN(maxxscale, maxyscale);
10121012   }
10131013
trunk/src/emu/validity.cpp
r250196r250197
719719   if (field.type() == IPT_POSITIONAL || field.type() == IPT_POSITIONAL_V)
720720   {
721721      int shift;
722      for (shift = 0; shift <= 31 && (~field.mask() & (1 << shift)) != 0; shift++) ;
722      for (shift = 0; shift <= 31 && (~field.mask() & (1 << shift)) != 0; shift++) { }
723723
724724      // convert the positional max value to be in the bitmask for testing
725      INT32 analog_max = field.maxval();
726      analog_max = (analog_max - 1) << shift;
725      //INT32 analog_max = field.maxval();
726      //analog_max = (analog_max - 1) << shift;
727727
728728      // positional port size must fit in bits used
729729      if ((field.mask() >> shift) + 1 < field.maxval())


Previous 199869 Revisions Next


© 1997-2024 The MAME Team