<commit_before>// Copyright 2014 Toggl Desktop developers.

#include "./workspace.h"

#include <sstream>

namespace kopsik {

std::string Workspace::String() {
  std::stringstream ss;
  ss  << "ID=" << id_
      << " local_id=" << local_id_
      << " name=" << name_;
  return ss.str();
}

void Workspace::SetUID(Poco::UInt64 value) {
  if (uid_ != value) {
    uid_ = value;
    dirty_ = true;
  }
}

void Workspace::SetID(Poco::UInt64 value) {
  if (id_ != value) {
    id_ = value;
    dirty_ = true;
  }
}

void Workspace::SetName(std::string value) {
  if (name_ != value) {
    name_ = value;
    dirty_ = true;
  }
}

void Workspace::SetPremium(const bool value) {
  if (premium_ != value) {
    premium_ = value;
    dirty_ = true;
  }
}

bool CompareWorkspaceByName(Workspace *a, Workspace *b) {
  return (strcmp(a->Name().c_str(), b->Name().c_str()) < 0);
}

}   // namespace kopsik
<commit_msg>Fix strcmp include (lib)<commit_after>// Copyright 2014 Toggl Desktop developers.

#include "./workspace.h"

#include <sstream>
#include <cstring>

namespace kopsik {

std::string Workspace::String() {
  std::stringstream ss;
  ss  << "ID=" << id_
      << " local_id=" << local_id_
      << " name=" << name_;
  return ss.str();
}

void Workspace::SetUID(Poco::UInt64 value) {
  if (uid_ != value) {
    uid_ = value;
    dirty_ = true;
  }
}

void Workspace::SetID(Poco::UInt64 value) {
  if (id_ != value) {
    id_ = value;
    dirty_ = true;
  }
}

void Workspace::SetName(std::string value) {
  if (name_ != value) {
    name_ = value;
    dirty_ = true;
  }
}

void Workspace::SetPremium(const bool value) {
  if (premium_ != value) {
    premium_ = value;
    dirty_ = true;
  }
}

bool CompareWorkspaceByName(Workspace *a, Workspace *b) {
  return (strcmp(a->Name().c_str(), b->Name().c_str()) < 0);
}

}   // namespace kopsik

{'fraction_non_alphanumeric': 0.16992399565689467, 'fraction_numerical': 0.009771986970684038, 'mean_word_length': 3.227064220183486, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 10, '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': '573339', 'n_tokens_mistral': 712, 'n_tokens_neox': 698, 'n_words': 159}