Skip to content

Commit

Permalink
add code comments, fixup some pre C++11 code
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeck88 committed Oct 15, 2016
1 parent 683d517 commit df8f42c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/font.cpp
Expand Up @@ -525,8 +525,7 @@ static void set_font_list(const std::vector<subset_descriptor>& fontlist)
{
clear_fonts();

std::vector<subset_descriptor>::const_iterator itor;
for(itor = fontlist.begin(); itor != fontlist.end(); ++itor) {
for(auto itor = fontlist.begin(); itor != fontlist.end(); ++itor) {
if (!check_font_file(itor->name)) continue;
// Insert fonts only if the font file exists
const subset_id subset = font_names.size();
Expand Down Expand Up @@ -1089,13 +1088,13 @@ bool load_font_config()

const std::vector<std::string> font_order = utils::split(fonts_config["order"]);
std::vector<font::subset_descriptor> fontlist;
std::vector<std::string>::const_iterator font;
for(font = font_order.begin(); font != font_order.end(); ++font) {

for(auto font = font_order.begin(); font != font_order.end(); ++font) {
add_font_to_fontlist(fonts_config, fontlist, *font);
known_fonts.erase(*font);
}
std::set<std::string>::const_iterator kfont;
for(kfont = known_fonts.begin(); kfont != known_fonts.end(); ++kfont) {

for(auto kfont = known_fonts.begin(); kfont != known_fonts.end(); ++kfont) {
add_font_to_fontlist(fonts_config, fontlist, *kfont);
}

Expand Down
4 changes: 4 additions & 0 deletions src/font.hpp
Expand Up @@ -24,6 +24,10 @@

class t_string;

/***
* Note: This is the SDL_TTF code path. For pango cairo code path, see class ttext.
*/

namespace font {

//object which initializes and destroys structures needed for fonts
Expand Down

0 comments on commit df8f42c

Please sign in to comment.