Self-consistent study of chemical short-range order and charge transfer in liquid alloys as a function of temperature