Skip to content

Commit

Permalink
Changed HasJsonAttributes.getAttributes (used by Field and Schema) to…
Browse files Browse the repository at this point in the history
… const.
  • Loading branch information
vnayar committed Mar 20, 2022
1 parent 6f92411 commit 6ef559f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/avro/attributes.d
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ mixin template HasJsonAttributes() {
name = The name of the property to add
value = The value for the property to add
*/
public void addAttribute(T)(string name, T value) {
void addAttribute(T)(string name, T value) {
if (name in attributes)
throw new AvroRuntimeException("Can't overwrite property: " ~ name);
attributes[name] = JSONValue(value);
}

/// Retrieve a map from JSON attribute names to their JSONValues.
OrderedMap!(string, JSONValue) getAttributes() {
const(OrderedMap!(string, JSONValue)) getAttributes() const {
return attributes;
}
}
Expand Down

0 comments on commit 6ef559f

Please sign in to comment.