<commit_before>#include <QFileDialog>
#include <QDir>

#include "include/swri_console/bag_reader.h"

#include <rosbag/bag.h>
#include <rosbag/view.h>

using namespace swri_console;

void BagReader::readBagFile(const QString& filename)
{
  rosbag::Bag bag;
  bag.open(filename.toStdString(), rosbag::bagmode::Read);

  std::vector<std::string> topics;
  topics.push_back(std::string("/rosout"));

  rosbag::View view(bag, rosbag::TopicQuery(topics));
  rosbag::View::const_iterator iter;

  for(iter = view.begin(); iter != view.end(); iter++)
  {<commit_msg>Fixing a cppcheck issue.<commit_after>#include <QFileDialog>
#include <QDir>

#include "include/swri_console/bag_reader.h"

#include <rosbag/bag.h>
#include <rosbag/view.h>

using namespace swri_console;

void BagReader::readBagFile(const QString& filename)
{
  rosbag::Bag bag;
  bag.open(filename.toStdString(), rosbag::bagmode::Read);

  std::vector<std::string> topics;
  topics.push_back(std::string("/rosout"));

  rosbag::View view(bag, rosbag::TopicQuery(topics));
  rosbag::View::const_iterator iter;

  for(iter = view.begin(); iter != view.end(); ++iter)
  {
{'fraction_non_alphanumeric': 0.17125110913930788, 'fraction_numerical': 0.0, 'mean_word_length': 6.470198675496689, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1830820', 'n_tokens_mistral': 416, 'n_tokens_neox': 405, 'n_words': 71}