refactor: take advantage of implicit conversion

This commit is contained in:
Anna 2021-04-10 18:09:32 -04:00
parent a51498b41a
commit fa30d51df4

View File

@ -66,18 +66,6 @@ namespace XivCommon.Functions {
this.Show(sender.Encode(), message.Encode(), options);
}
public void Show(string sender, string message, BattleTalkOptions? options = null) {
this.Show(Encoding.UTF8.GetBytes(sender), Encoding.UTF8.GetBytes(message), options);
}
public void Show(SeString sender, string message, BattleTalkOptions? options = null) {
this.Show(sender.Encode(), Encoding.UTF8.GetBytes(message), options);
}
public void Show(string sender, SeString message, BattleTalkOptions? options = null) {
this.Show(Encoding.UTF8.GetBytes(sender), message.Encode(), options);
}
private void Show(byte[] sender, byte[] message, BattleTalkOptions? options) {
if (sender.Length == 0) {
throw new ArgumentException("sender cannot be empty", nameof(sender));