@@ -46,7 +46,10 @@ const Rows& Term::Window::rows() const noexcept { return m_size.rows(); }
46
46
void Term::Window::set_char (const std::size_t & column, const std::size_t & row, const char32_t & character)
47
47
{
48
48
if (insideWindow (column, row)) { m_chars[index (column, row)] = character; }
49
- else { throw Term::Exception (" set_char(): (x,y) out of bounds" ); }
49
+ else
50
+ {
51
+ throw Term::Exception (" set_char(): (x,y) out of bounds" );
52
+ }
50
53
}
51
54
52
55
void Term::Window::set_fg_reset (const std::size_t & column, const std::size_t & row)
@@ -91,7 +94,10 @@ void Term::Window::set_h(const std::size_t& new_h)
91
94
m_style.insert (m_style.end (), dc, Style::Reset);
92
95
m_size = {Term::Columns (m_size.columns ()), Term::Rows (new_h)};
93
96
}
94
- else { throw Term::Exception (" Shrinking height not supported." ); }
97
+ else
98
+ {
99
+ throw Term::Exception (" Shrinking height not supported." );
100
+ }
95
101
}
96
102
97
103
void Term::Window::print_str (const std::size_t & x, const std::size_t & y, const std::string& s, const std::size_t & indent, bool move_cursor)
@@ -109,12 +115,18 @@ void Term::Window::print_str(const std::size_t& x, const std::size_t& y, const s
109
115
{
110
116
for (std::size_t j = 0 ; j < indent; ++j) { set_char (x + j, ypos, ' .' ); }
111
117
}
112
- else { return ; }
118
+ else
119
+ {
120
+ return ;
121
+ }
113
122
}
114
123
else
115
124
{
116
125
if (insideWindow (xpos, ypos)) { set_char (xpos, y, i); }
117
- else { return ; }
126
+ else
127
+ {
128
+ return ;
129
+ }
118
130
++xpos;
119
131
}
120
132
}
0 commit comments