Bug 1407494 (part 4) - Remove have_PrefChangedFunc_typedef. r=glandium.

This is detritus from old changes that can be cleaned up now.

The patch removes the declaration of PrefChangedFunc from Preferences.cpp
because it's also in Preferences.h, which is included by Preferences.cpp.

The patch also removes the part of the comment about passing a non-zero result
because it's clearly false -- the callback has no return value.

MozReview-Commit-ID: 72cdauYsRUt

--HG--
extra : rebase_source : 84cbbcea3b0ce3242c629e428be1e81be9cb5792
This commit is contained in:
Nicholas Nethercote 2017-10-13 15:24:58 +11:00
Родитель 89d51cf936
Коммит 003d9a950d
2 изменённых файлов: 3 добавлений и 18 удалений

Просмотреть файл

@ -375,20 +375,6 @@ PREF_ClearUserPref(const char* aPrefName);
nsresult nsresult
PREF_ClearAllUserPrefs(); PREF_ClearAllUserPrefs();
// The callback function will get passed the pref_node which triggered the call
// and the void* instance_data which was passed to the registered callback
// function. Return a non-zero result (nsresult) to pass an error up to the
// caller.
//
// Temporarily conditionally compile PrefChangedFunc typedef. During migration
// from old libpref to nsIPref we need it in both header files. Eventually
// prefapi.h will become a private file. The two types need to be in sync for
// now. Certain compilers were having problems with multiple definitions.
#ifndef have_PrefChangedFunc_typedef
typedef void (*PrefChangedFunc)(const char*, void*);
#define have_PrefChangedFunc_typedef
#endif
// Register a callback. This takes a node in the preference tree and will call // Register a callback. This takes a node in the preference tree and will call
// the callback function if anything below that node is modified. Unregister // the callback function if anything below that node is modified. Unregister
// returns PREF_NOERROR if a callback was found that matched all the // returns PREF_NOERROR if a callback was found that matched all the

Просмотреть файл

@ -22,10 +22,9 @@
class nsIFile; class nsIFile;
#ifndef have_PrefChangedFunc_typedef // The callback function will get passed the pref name which triggered the call
typedef void (*PrefChangedFunc)(const char*, void*); // and the void* data which was passed to the registered callback function.
#define have_PrefChangedFunc_typedef typedef void (*PrefChangedFunc)(const char* aPref, void* aData);
#endif
#ifdef DEBUG #ifdef DEBUG
enum pref_initPhase enum pref_initPhase