Skip to content

Commit 601addd

Browse files
committed
more feedback
1 parent 7cfbdcd commit 601addd

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

fred2/orienteditor.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ BOOL orient_editor::OnInitDialog()
186186
/**
187187
* Checks whether the position value is close enough to the input string value that we can assume the input has not changed.
188188
*/
189-
bool orient_editor::is_close(float val, const CString &input_str)
189+
bool orient_editor::is_close(float val, const CString &input_str) const
190190
{
191191
val = perform_input_rounding(val);
192192
float input_val = convert(input_str);
@@ -198,7 +198,7 @@ bool orient_editor::is_close(float val, const CString &input_str)
198198
/**
199199
* Checks whether the angle value is close enough to the input string value that we can assume the input has not changed.
200200
*/
201-
bool orient_editor::is_angle_close(float rad, const CString &input_str)
201+
bool orient_editor::is_angle_close(float rad, const CString &input_str) const
202202
{
203203
float deg = perform_input_rounding(to_degrees(rad));
204204
float input_deg = normalize_degrees(convert(input_str));
@@ -391,7 +391,7 @@ float orient_editor::normalize_degrees(float deg)
391391
/**
392392
* Extract a float from the CString, being mindful of any comma separators.
393393
*/
394-
float orient_editor::convert(const CString &str)
394+
float orient_editor::convert(const CString &str) const
395395
{
396396
char buf[256];
397397
size_t i, j, len;
@@ -411,7 +411,7 @@ float orient_editor::convert(const CString &str)
411411
* This accounts for not only decimal rounding to the precision of the input box, but also floating point rounding due to inexact fractions such as 1/10.
412412
* See also GitHub PR #4475.
413413
*/
414-
float orient_editor::perform_input_rounding(float val)
414+
float orient_editor::perform_input_rounding(float val) const
415415
{
416416
CString str;
417417
str.Format(INPUT_FORMAT, val);

fred2/orienteditor.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,12 @@ class orient_editor : public CDialog
7070
DECLARE_MESSAGE_MAP()
7171

7272
private:
73-
float convert(const CString &str);
74-
float perform_input_rounding(float val);
73+
float convert(const CString &str) const;
74+
float perform_input_rounding(float val) const;
75+
76+
bool is_close(float val, const CString &input_str) const;
77+
bool is_angle_close(float rad, const CString &input_str) const;
7578

76-
bool is_close(float val, const CString &input_str);
77-
bool is_angle_close(float rad, const CString &input_str);
7879
int total;
7980
int index[MAX_OBJECTS];
8081
void actually_point_object(object *ptr);

0 commit comments

Comments
 (0)