minor refactor in counters_to_array and some typos

This commit is contained in:
Alden Torres 2017-03-07 12:33:23 -05:00 committed by Arvid Norberg
parent 7d3a8f5b19
commit 2a42058f74
4 changed files with 6 additions and 6 deletions

View File

@ -144,7 +144,7 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE #ifndef TORRENT_NO_DEPRECATE
// Alerts on RSS related events, like feeds being updated, feed error // Alerts on RSS related events, like feeds being updated, feed error
// conditions and successful RSS feed updates. Enabling this categoty // conditions and successful RSS feed updates. Enabling this category
// will make you receive rss_alert alerts. // will make you receive rss_alert alerts.
rss_notification = 0x1000, rss_notification = 0x1000,
#endif #endif

View File

@ -1565,7 +1565,7 @@ namespace libtorrent
// This alert is posted approximately once every second, and it contains // This alert is posted approximately once every second, and it contains
// byte counters of most statistics that's tracked for torrents. Each active // byte counters of most statistics that's tracked for torrents. Each active
// torrent posts these alerts regularly. // torrent posts these alerts regularly.
// This alert has been superceded by calling ``post_torrent_updates()`` // This alert has been superseded by calling ``post_torrent_updates()``
// regularly on the session object. This alert will be removed // regularly on the session object. This alert will be removed
struct TORRENT_EXPORT stats_alert final : torrent_alert struct TORRENT_EXPORT stats_alert final : torrent_alert
{ {

View File

@ -1725,12 +1725,12 @@ namespace libtorrent
namespace namespace
{ {
std::array<std::int64_t, counters::num_counters> counters_to_array(counters const& cnt) aux::array<std::int64_t, counters::num_counters> counters_to_array(counters const& cnt)
{ {
std::array<std::int64_t, counters::num_counters> arr; aux::array<std::int64_t, counters::num_counters> arr;
for (int i = 0; i < counters::num_counters; ++i) for (int i = 0; i < counters::num_counters; ++i)
arr[std::size_t(i)] = cnt[i]; arr[i] = cnt[i];
return arr; return arr;
} }

View File

@ -589,7 +589,7 @@ namespace aux {
#ifndef TORRENT_DISABLE_LOGGING #ifndef TORRENT_DISABLE_LOGGING
// this alert is a bit special. The stats headers aren't very useful // this alert is a bit special. The stats headers aren't very useful
// unless session_stats is enabled, sp it's posted in the session_Stats // unless session_stats is enabled, so it's posted in the session_stats
// category as well // category as well
if (m_alerts.should_post<log_alert>() if (m_alerts.should_post<log_alert>()
|| m_alerts.should_post<session_stats_alert>()) || m_alerts.should_post<session_stats_alert>())