From 29030b54c98b0aee65fbc10ebf7ba36bed98c02c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 10 Aug 2013 18:02:44 +0200 Subject: util/Error: new error passing library Replaces GLib's GError. --- src/util/Tokenizer.hxx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/util/Tokenizer.hxx') diff --git a/src/util/Tokenizer.hxx b/src/util/Tokenizer.hxx index da45348d4..a689dc31d 100644 --- a/src/util/Tokenizer.hxx +++ b/src/util/Tokenizer.hxx @@ -20,7 +20,7 @@ #ifndef MPD_TOKENIZER_HXX #define MPD_TOKENIZER_HXX -#include "gerror.h" +class Error; class Tokenizer { char *input; @@ -50,23 +50,23 @@ public: /** * Reads the next word. * - * @param error_r if this function returns nullptr and - * **input_p!=0, it optionally provides a GError object in + * @param error if this function returns nullptr and + * **input_p!=0, it provides an #Error object in * this argument * @return a pointer to the null-terminated word, or nullptr * on error or end of line */ - char *NextWord(GError **error_r); + char *NextWord(Error &error); /** * Reads the next unquoted word from the input string. * * @param error_r if this function returns nullptr and **input_p!=0, it - * optionally provides a GError object in this argument + * provides an #Error object in this argument * @return a pointer to the null-terminated word, or nullptr * on error or end of line */ - char *NextUnquoted(GError **error_r); + char *NextUnquoted(Error &error); /** * Reads the next quoted string from the input string. A backslash @@ -76,11 +76,11 @@ public: * @param input_p the input string; this function returns a pointer to * the first non-whitespace character of the following token * @param error_r if this function returns nullptr and **input_p!=0, it - * optionally provides a GError object in this argument + * provides an #Error object in this argument * @return a pointer to the null-terminated string, or nullptr on error * or end of line */ - char *NextString(GError **error_r); + char *NextString(Error &error); /** * Reads the next unquoted word or quoted string from the @@ -88,12 +88,12 @@ public: * NextString(). * * @param error_r if this function returns nullptr and - * **input_p!=0, it optionally provides a GError object in + * **input_p!=0, it provides an #Error object in * this argument * @return a pointer to the null-terminated string, or nullptr * on error or end of line */ - char *NextParam(GError **error_r); + char *NextParam(Error &error); }; #endif -- cgit v1.2.3