comparison enigma/rotor.cpp @ 2:713fa2a9ea9a

CxxTest support. Added rotor tests.
author Brian Neal <bgneal@gmail.com>
date Fri, 22 Jun 2012 22:02:55 -0500
parents 1459e74fda3f
children
comparison
equal deleted inserted replaced
1:1459e74fda3f 2:713fa2a9ea9a
89 // Build a lookup table that tells us when the pawls are allowed to step. 89 // Build a lookup table that tells us when the pawls are allowed to step.
90 // The index to this array is the current display letter [A-Z] - 'A'. 90 // The index to this array is the current display letter [A-Z] - 'A'.
91 91
92 if (stepping != nullptr) 92 if (stepping != nullptr)
93 { 93 {
94 for (char c = *stepping; *stepping != '\0'; ++stepping) 94 for (char c = *stepping; *stepping != '\0'; c = *(++stepping))
95 { 95 {
96 if (ucase_set.find(c) != ucase_set.end()) 96 if (ucase_set.find(c) != ucase_set.end())
97 { 97 {
98 step_map[c - 'A'] = true; 98 step_map[c - 'A'] = true;
99 } 99 }