All ordinances in force within any such former city or cities, at the time of consolidation or annexation, not in conflict with the laws governing the consolidated city, or with the ordinances of the former city having the largest population, as shown by the last determination of the office of financial management shall remain in full force and effect until superseded or repealed by the legislative body of the consolidated or annexing city, and shall be enforced by such city, but all ordinances of such former cities, in conflict with such ordinances shall be deemed repealed by, and from and after, such consolidation or annexation, but nothing in this section shall be construed to discharge any person from any liability, civil or criminal, for any violation of any ordinance of such former city or cities incurred prior to such consolidation or annexation.