17ec681f3Smrg/* 27ec681f3Smrg * Copyright © 2019-2020 Collabora, Ltd. 37ec681f3Smrg * Author: Antonio Caggiano <antonio.caggiano@collabora.com> 47ec681f3Smrg * Author: Rohan Garg <rohan.garg@collabora.com> 57ec681f3Smrg * Author: Robert Beckett <bob.beckett@collabora.com> 67ec681f3Smrg * 77ec681f3Smrg * SPDX-License-Identifier: MIT 87ec681f3Smrg */ 97ec681f3Smrg 107ec681f3Smrg#include "pps_counter.h" 117ec681f3Smrg 127ec681f3Smrg#include <cassert> 137ec681f3Smrg#include <cstring> 147ec681f3Smrg 157ec681f3Smrg#include "pps_algorithm.h" 167ec681f3Smrg 177ec681f3Smrgnamespace pps 187ec681f3Smrg{ 197ec681f3SmrgCounter::Counter(int32_t id, const std::string &name, int32_t group) 207ec681f3Smrg : id {id} 217ec681f3Smrg , name {name} 227ec681f3Smrg , group {group} 237ec681f3Smrg{ 247ec681f3Smrg assert(id >= 0 && "Invalid counter ID"); 257ec681f3Smrg assert(group >= 0 && "Invalid group ID"); 267ec681f3Smrg} 277ec681f3Smrg 287ec681f3Smrgbool Counter::operator==(const Counter &other) const 297ec681f3Smrg{ 307ec681f3Smrg return id == other.id; 317ec681f3Smrg} 327ec681f3Smrg 337ec681f3Smrg} // namespace pps 34