mirror of
https://github.com/yuzu-emu/sirit.git
synced 2024-11-22 12:35:42 +01:00
22cc6f6c1b
Enable cast warnings in gcc and clang and always treat warnings as errors. GetWordCount now returns std::size_t for simplicity and the word count is asserted and casted in WordCount (now called CalculateTotalWords. Silence warnings.
31 lines
623 B
C++
31 lines
623 B
C++
/* This file is part of the sirit project.
|
|
* Copyright (c) 2019 sirit
|
|
* This software may be used and distributed according to the terms of the
|
|
* 3-Clause BSD License
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
#include "operand.h"
|
|
#include "stream.h"
|
|
|
|
namespace Sirit {
|
|
|
|
class LiteralString final : public Operand {
|
|
public:
|
|
LiteralString(std::string string);
|
|
~LiteralString() override;
|
|
|
|
void Fetch(Stream& stream) const override;
|
|
|
|
std::size_t GetWordCount() const noexcept override;
|
|
|
|
bool operator==(const Operand& other) const noexcept override;
|
|
|
|
private:
|
|
std::string string;
|
|
};
|
|
|
|
} // namespace Sirit
|