Skip to content

Commit 199cf12

Browse files
More functional fixes.
1 parent 5121858 commit 199cf12

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

RESTProcess_base.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ namespace classdesc
719719
callFunction(const string& remainder, const REST_PROCESS_BUFFER& arguments, F f)
720720
{
721721
JSONBuffer argBuf(arguments);
722-
auto& r=functional::CallOnBuffer(argBuf,f)();
722+
auto& r=functional::callOnBuffer(argBuf,f);
723723
if (remainder.empty())
724724
{
725725
// if there are arguments left over, assign the first of the
@@ -757,7 +757,7 @@ namespace classdesc
757757
callFunction(const string& remainder, const REST_PROCESS_BUFFER& arguments, F f)
758758
{
759759
JSONBuffer argBuf(arguments);
760-
auto r=functional::CallOnBuffer(argBuf,f)();
760+
auto r=functional::callOnBuffer(argBuf,f);
761761
if (remainder.empty())
762762
{
763763
REST_PROCESS_BUFFER rj;
@@ -776,7 +776,7 @@ namespace classdesc
776776
callFunction(const string& remainder, const REST_PROCESS_BUFFER& arguments, F f)
777777
{
778778
JSONBuffer argBuf(arguments);
779-
functional::CallOnBuffer(argBuf,f)();
779+
functional::callOnBuffer(argBuf,f);
780780
return {};
781781
}
782782

function.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -609,8 +609,11 @@ namespace classdesc
609609
R operator()() {return f();}
610610
};
611611

612+
template <class Buffer, class F>
613+
typename Return<F>::T callOnBuffer(Buffer& buff, F f)
614+
{return CallOnBuffer<Buffer,F,typename Return<F>::T>(buff,f)();}
612615

613-
616+
614617
template <class Buffer>
615618
class PackFunctor: public Buffer
616619
{

0 commit comments

Comments
 (0)