From e4fd839ddaaf3fc68df2cb502a633a2ae6a9f86f Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 23 Aug 2012 23:56:35 +0200 Subject: use a strongly typed int CharCount for character counts --- src/command_manager.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/command_manager.hh') diff --git a/src/command_manager.hh b/src/command_manager.hh index 113bac3e..cbc6a2c7 100644 --- a/src/command_manager.hh +++ b/src/command_manager.hh @@ -28,13 +28,13 @@ typedef std::function CommandCompleter; + size_t, CharCount)> CommandCompleter; class PerArgumentCommandCompleter { public: typedef std::function ArgumentCompleter; + const String&, CharCount)> ArgumentCompleter; typedef memoryview ArgumentCompleterList; PerArgumentCommandCompleter(const ArgumentCompleterList& completers) @@ -43,7 +43,7 @@ public: CandidateList operator()(const Context& context, const CommandParameters& params, size_t token_to_complete, - size_t pos_in_token) const; + CharCount pos_in_token) const; private: std::vector m_completers; @@ -56,7 +56,7 @@ public: const EnvVarMap& env_vars = EnvVarMap()); Completions complete(const Context& context, - const String& command_line, size_t cursor_pos); + const String& command_line, CharCount cursor_pos); bool command_defined(const String& command_name) const; -- cgit v1.2.3