From 87b90f505d52ccbfbd17cc4dd236210eaebfe219 Mon Sep 17 00:00:00 2001 From: Cebtenzzre Date: Tue, 5 Sep 2023 18:51:58 -0400 Subject: [PATCH] train : remove inaccurate my_llama_hparams::operator== (clang-tidy) This operator overload is not used anyway - explicitly deleting it seems to have no effect on compilation. train-text-from-scratch.cpp:174:16: warning: comparing object representation of type 'my_llama_hparams' which does not have a unique object representation; consider comparing the members of the object manually [bugprone-suspicious-memory-comparison] return memcmp(this, &other, sizeof(my_llama_hparams)); ^ --- examples/train-text-from-scratch/train-text-from-scratch.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/examples/train-text-from-scratch/train-text-from-scratch.cpp b/examples/train-text-from-scratch/train-text-from-scratch.cpp index 6fe85d419..d1fcd7211 100644 --- a/examples/train-text-from-scratch/train-text-from-scratch.cpp +++ b/examples/train-text-from-scratch/train-text-from-scratch.cpp @@ -169,10 +169,6 @@ struct my_llama_hparams { float rope_freq_base = 10000.0f; float rope_freq_scale = 1.0f; - - bool operator!=(const my_llama_hparams& other) const { - return memcmp(this, &other, sizeof(my_llama_hparams)); - } }; struct my_llama_layer {