Skip to content

Commit

Permalink
fix compiler warning about random_shuffle
Browse files Browse the repository at this point in the history
  • Loading branch information
davidly committed Dec 21, 2023
1 parent 187c74b commit ee8be49
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions djl_rssrdr.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <regex>
#include <codecvt>
#include <locale>
#include <random>
#include <assert.h>

#define USE_DEBUG_FILES false
Expand Down Expand Up @@ -446,8 +447,10 @@ class CRssFeed
string response = load_feed( feedv[ feed_item ] );
parse_items( response, max_item_size );
}

std::random_shuffle( rssItems.begin(), rssItems.end() );

std::random_device rd;
std::mt19937 g(rd());
std::shuffle( rssItems.begin(), rssItems.end(), g );
return rssItems.size();
} //load_rss_feeds

Expand Down

0 comments on commit ee8be49

Please sign in to comment.