Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 219b311b authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "PDL: Move GenInclude and GenUsing to CustomDef"

parents db6332bc fcaacc7f
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -28,14 +28,6 @@ TypeDef::Type ChecksumDef::GetDefinitionType() const {
  return TypeDef::Type::CHECKSUM;
}

void ChecksumDef::GenInclude(std::ostream& s) const {
  CustomFieldDef::GenInclude(s);
}

void ChecksumDef::GenUsing(std::ostream& s) const {
  CustomFieldDef::GenUsing(s);
}

void ChecksumDef::GenChecksumCheck(std::ostream& s) const {
  s << "static_assert(ChecksumTypeChecker<" << name_ << "," << util::GetTypeForSize(size_) << ">::value, \"";
  s << name_ << " is not a valid checksum type. Please see README for more details.\");";
+0 −4
Original line number Diff line number Diff line
@@ -32,10 +32,6 @@ class ChecksumDef : public CustomFieldDef {

  virtual TypeDef::Type GetDefinitionType() const override;

  virtual void GenInclude(std::ostream& s) const override;

  virtual void GenUsing(std::ostream& s) const override;

  void GenChecksumCheck(std::ostream& s) const;

  const std::string include_;
+2 −2
Original line number Diff line number Diff line
@@ -30,9 +30,9 @@ class CustomFieldDef : public TypeDef {

  virtual Type GetDefinitionType() const override;

  virtual void GenInclude(std::ostream& s) const;
  void GenInclude(std::ostream& s) const;

  virtual void GenUsing(std::ostream& s) const;
  void GenUsing(std::ostream& s) const;

  const std::string include_;
};
+0 −4
Original line number Diff line number Diff line
@@ -45,7 +45,3 @@ bool EnumDef::HasEntry(std::string name) const {
TypeDef::Type EnumDef::GetDefinitionType() const {
  return TypeDef::Type::ENUM;
}

void EnumDef::GenInclude(std::ostream&) const {}

void EnumDef::GenUsing(std::ostream&) const {}
+0 −4
Original line number Diff line number Diff line
@@ -36,10 +36,6 @@ class EnumDef : public TypeDef {

  virtual Type GetDefinitionType() const override;

  virtual void GenInclude(std::ostream& s) const override;

  virtual void GenUsing(std::ostream& s) const override;

  // data
  std::map<uint32_t, std::string> constants_;
  std::set<std::string> entries_;
Loading