It's better use std::set for codes