MCPcopy Create free account
hub / github.com/aldelaro5/dolphin-memory-engine / updateDigitsPerBox

Method updateDigitsPerBox

Source/GUI/MemViewer/MemViewer.cpp:605–698  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

603}
604
605void MemViewer::updateDigitsPerBox()
606{
607 switch (m_type)
608 {
609 case Common::MemType::type_byte:
610 switch (m_base)
611 {
612 case Common::MemBase::base_decimal:
613 m_digitsPerBox = m_isUnsigned ? 3 : 4;
614 break;
615 case Common::MemBase::base_hexadecimal:
616 m_digitsPerBox = 2;
617 break;
618 case Common::MemBase::base_binary:
619 m_digitsPerBox = 8;
620 break;
621 case Common::MemBase::base_octal:
622 case Common::MemBase::base_none:
623 m_digitsPerBox = 2; // Shouldn't ever reach here
624 }
625 break;
626 case Common::MemType::type_halfword:
627 switch (m_base)
628 {
629 case Common::MemBase::base_decimal:
630 m_digitsPerBox = m_isUnsigned ? 5 : 6;
631 break;
632 case Common::MemBase::base_hexadecimal:
633 m_digitsPerBox = 4;
634 break;
635 case Common::MemBase::base_binary:
636 m_digitsPerBox = 16;
637 break;
638 case Common::MemBase::base_octal:
639 case Common::MemBase::base_none:
640 m_digitsPerBox = 2; // Shouldn't ever reach here
641 }
642 break;
643 case Common::MemType::type_word:
644 switch (m_base)
645 {
646 case Common::MemBase::base_decimal:
647 m_digitsPerBox = m_isUnsigned ? 10 : 11;
648 break;
649 case Common::MemBase::base_hexadecimal:
650 m_digitsPerBox = 8;
651 break;
652 case Common::MemBase::base_binary:
653 m_digitsPerBox = 32;
654 break;
655 case Common::MemBase::base_octal:
656 case Common::MemBase::base_none:
657 m_digitsPerBox = 2; // Shouldn't ever reach here
658 }
659 break;
660 case Common::MemType::type_doubleword:
661 switch (m_base)
662 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected