You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the field decoders were arrived at through a few iterations, there are still remnants of older methodology in the code base, and this can be cleaned up to simplify the decoders.
An example would be the "SetValue" method, which was when the decoders were treated as their own virtual objects that would be containing the value that they decoded as part of the process.
However, decoders really should just be simple readers that take in a BitBuffer and spit out an object value based on how they are configured to read it.
Along with this, when generating them from the field definition, we should only need to return decoders that are logically unique, for example a CHandleDecoder is really just a UInt32 decoder, so during the serializer retrieval we should simplify the list of available decoders so that these special cases just return the decoder that is actually needed instead of a whole new class.
As well the names of the functions can be updated so that they are describing the actual intent of the class.
This renaming can be applied to the decoders themselves as well,
for example DUint32 should be renamed UInt32Decoder
Some nesting can be done as well like using float decoders in the QAngle decoder but that is subjective of if it actually matters or not (floats are just annoying to handle in general)
The text was updated successfully, but these errors were encountered:
Since the field decoders were arrived at through a few iterations, there are still remnants of older methodology in the code base, and this can be cleaned up to simplify the decoders.
An example would be the "SetValue" method, which was when the decoders were treated as their own virtual objects that would be containing the value that they decoded as part of the process.
However, decoders really should just be simple readers that take in a BitBuffer and spit out an object value based on how they are configured to read it.
Along with this, when generating them from the field definition, we should only need to return decoders that are logically unique, for example a CHandleDecoder is really just a UInt32 decoder, so during the serializer retrieval we should simplify the list of available decoders so that these special cases just return the decoder that is actually needed instead of a whole new class.
As well the names of the functions can be updated so that they are describing the actual intent of the class.
This renaming can be applied to the decoders themselves as well,
for example DUint32 should be renamed UInt32Decoder
Some nesting can be done as well like using float decoders in the QAngle decoder but that is subjective of if it actually matters or not (floats are just annoying to handle in general)
The text was updated successfully, but these errors were encountered: