I also still don't understand how your updateTechCommerce() function works without a tech as an argument. I really think you should reevalute that code and consider setting it up so that the tech type is passed as an argument Ie make it CvCity::updateTechCommerce(TechTypes eTech)
I have three functions. updateTechCommerce() loops through all the techs, getTechCommerceByTech(CommerceTypes eIndex, TechTypes eTech) determines if they have been researched or not and returns the commerce increase for each that has been researched. Each researched tech's commerce increase is then added up in updateTechCommerce() and then it checks to see if that value matches the one returned by getTechCommerce(CommerceTypes eIndex), which was the previous total commerce increase for all researched techs.