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

Commit 827610f0 authored by Myles Watson's avatar Myles Watson Committed by Gerrit Code Review
Browse files

Merge "PDL: Make vector getters and ToString const" into main

parents 6d47ae3f 7495dc71
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ std::string ArrayField::GetGetterFunctionName() const {
}

void ArrayField::GenGetter(std::ostream& s, Size start_offset, Size end_offset) const {
  s << GetDataType() << " " << GetGetterFunctionName() << "() {";
  s << GetDataType() << " " << GetGetterFunctionName() << "() const {";
  s << "ASSERT(was_validated_);";
  s << "size_t end_index = size();";
  s << "auto to_bound = begin();";
+1 −1
Original line number Diff line number Diff line
@@ -151,7 +151,7 @@ std::string VectorField::GetGetterFunctionName() const {
}

void VectorField::GenGetter(std::ostream& s, Size start_offset, Size end_offset) const {
  s << GetDataType() << " " << GetGetterFunctionName() << "() {";
  s << GetDataType() << " " << GetGetterFunctionName() << "() const {";
  s << "ASSERT(was_validated_);";
  s << "size_t end_index = size();";
  s << "auto to_bound = begin();";
+1 −1
Original line number Diff line number Diff line
@@ -347,7 +347,7 @@ void PacketDef::GenValidator(std::ostream& s) const {
}

void PacketDef::GenParserToString(std::ostream& s) const {
  s << "virtual std::string ToString() " << (parent_ != nullptr ? " override" : "") << " {";
  s << "virtual std::string ToString() const " << (parent_ != nullptr ? " override" : "") << " {";
  s << "std::stringstream ss;";
  s << "ss << std::showbase << std::hex << \"" << name_ << " { \";";

+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ void StructDef::GenSpecialize(std::ostream& s) const {
}

void StructDef::GenToString(std::ostream& s) const {
  s << "std::string ToString() {";
  s << "std::string ToString() const {";
  s << "std::stringstream ss;";
  s << "ss << std::hex << std::showbase << \"" << name_ << " { \";";