Skip to content

Commit

Permalink
Blank space tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
mridgers committed Jun 15, 2023
1 parent 3f59046 commit 9c7e59c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions clink/app/src/history/history_db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class ReadLock
public:
FileIter() = default;
FileIter(const ReadLock& lock, char* buffer, int32 buffer_size);
template <int32 S> FileIter(const ReadLock& lock, char (&buffer)[S]);
template <int32 S> FileIter(const ReadLock& lock, char (&buffer)[S]);
uint32 next(uint32 rollback=0);
uint32 get_buffer_offset() const { return _buffer_offset; }
char* get_buffer() const { return _buffer; }
Expand All @@ -199,7 +199,7 @@ class ReadLock
public:
LineIter() = default;
LineIter(const ReadLock& lock, char* buffer, int32 buffer_size);
template <int32 S> LineIter(const ReadLock& lock, char (&buffer)[S]);
template <int32 S> LineIter(const ReadLock& lock, char (&buffer)[S]);
LineIdImpl next(StrIter& out);

private:
Expand Down
2 changes: 1 addition & 1 deletion clink/app/src/history/history_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class HistoryDb
bool remove(LineId id);
LineId find(const char* line) const;
ExpandResult expand(const char* line, StrBase& out) const;
template <int32 S> Iter read_lines(char (&buffer)[S]);
template <int32 S> Iter read_lines(char (&buffer)[S]);
Iter read_lines(char* buffer, uint32 buffer_size);

private:
Expand Down
28 changes: 14 additions & 14 deletions clink/core/include/core/str.h
Original file line number Diff line number Diff line change
Expand Up @@ -358,26 +358,26 @@ class StrBase : public StrImpl<char>
{
public:
template <int32 I> StrBase(char (&data)[I]) : StrImpl<char>(data, I - 1) {}
StrBase(char* data, int32 size) : StrImpl<char>(data, size) {}
StrBase(const StrBase&) = delete;
StrBase(const StrBase&&) = delete;
int32 from_utf16(const wchar_t* utf16) { clear(); return to_utf8(*this, utf16); }
void operator = (const char* value) { copy(value); }
void operator = (const wchar_t* value) { from_utf16(value); }
void operator = (const StrBase& rhs) = delete;
StrBase(char* data, int32 size) : StrImpl<char>(data, size) {}
StrBase(const StrBase&) = delete;
StrBase(const StrBase&&) = delete;
int32 from_utf16(const wchar_t* utf16) { clear(); return to_utf8(*this, utf16); }
void operator = (const char* value) { copy(value); }
void operator = (const wchar_t* value) { from_utf16(value); }
void operator = (const StrBase& rhs) = delete;
};

class WstrBase : public StrImpl<wchar_t>
{
public:
template <int32 I> WstrBase(char (&data)[I]) : StrImpl<wchar_t>(data, I - 1) {}
WstrBase(wchar_t* data, int32 size) : StrImpl<wchar_t>(data, size) {}
WstrBase(const WstrBase&) = delete;
WstrBase(const WstrBase&&) = delete;
int32 from_utf8(const char* utf8) { clear(); return to_utf16(*this, utf8); }
void operator = (const wchar_t* value) { copy(value); }
void operator = (const char* value) { from_utf8(value); }
void operator = (const WstrBase&) = delete;
WstrBase(wchar_t* data, int32 size) : StrImpl<wchar_t>(data, size) {}
WstrBase(const WstrBase&) = delete;
WstrBase(const WstrBase&&) = delete;
int32 from_utf8(const char* utf8) { clear(); return to_utf16(*this, utf8); }
void operator = (const wchar_t* value) { copy(value); }
void operator = (const char* value) { from_utf8(value); }
void operator = (const WstrBase&) = delete;
};


Expand Down
2 changes: 1 addition & 1 deletion clink/terminal/include/terminal/ecma48_iter.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class Ecma48Code
uint32 get_length() const { return _length; }
Type get_type() const { return _type; }
uint32 get_code() const { return _code; }
template <int32 S> bool decode_csi(Csi<S>& out) const;
template <int32 S> bool decode_csi(Csi<S>& out) const;
bool get_c1_str(StrBase& out) const;

private:
Expand Down
2 changes: 1 addition & 1 deletion clink/terminal/include/terminal/terminal_out.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TerminalOut
virtual void begin() = 0;
virtual void end() = 0;
virtual void write(const char* chars, int32 length) = 0;
template <int32 S> void write(const char (&chars)[S]);
template <int32 S> void write(const char (&chars)[S]);
virtual void flush() = 0;
virtual int32 get_columns() const = 0;
virtual int32 get_rows() const = 0;
Expand Down

0 comments on commit 9c7e59c

Please sign in to comment.