8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 17:23:03 +01:00

Small optimization - avoid use of std::function<> where not necessary

This commit is contained in:
AlexPeshkoff 2024-08-13 19:40:02 +03:00
parent 47a98d6403
commit 0f8e7c185c
2 changed files with 5 additions and 4 deletions

View File

@ -32,7 +32,6 @@
#define CLASSES_AUTO_PTR_H #define CLASSES_AUTO_PTR_H
#include <stdio.h> #include <stdio.h>
#include <functional>
namespace Firebird { namespace Firebird {
@ -318,11 +317,11 @@ private:
T oldValue; T oldValue;
}; };
template <typename F>
class Cleanup class Cleanup
{ {
public: public:
Cleanup(std::function<void()> clFunc) Cleanup(F&& clFunc)
: clean(clFunc) : clean(clFunc)
{ } { }
@ -332,7 +331,7 @@ public:
} }
private: private:
std::function<void()> clean; F& clean;
}; };
} //namespace Firebird } //namespace Firebird

View File

@ -36,6 +36,8 @@
#include "../common/MsgMetadata.h" #include "../common/MsgMetadata.h"
#include "../common/classes/ClumpletWriter.h" #include "../common/classes/ClumpletWriter.h"
#include <functional>
namespace Why namespace Why
{ {