Skip to content

Commit

Permalink
remove unneeded placement new ops
Browse files Browse the repository at this point in the history
  • Loading branch information
chinnnathan committed May 12, 2023
1 parent 4ea22cc commit 77ed790
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions cpp/qlearn.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ namespace tinymind {
typedef typename EnvironmentType::EnvironmentStateType StateType;
typedef typename EnvironmentType::EnvironmentActionType ActionType;
typedef typename EnvironmentType::EnvironmentValueType ValueType;

static ActionType selectBestActionForState(const StateType state, ActionType const* const actions, const size_t numberOfValidActions, const QLearnerQValuePolicy& qValuePolicy)
{
ActionType bestAction;
Expand Down Expand Up @@ -527,10 +527,6 @@ namespace tinymind {
}
}

void * operator new(size_t, void *p)
{
return p;
}
private:
void copyNetworkWeights()
{
Expand Down Expand Up @@ -657,11 +653,6 @@ namespace tinymind {

this->mState = experience.newState;
}

void * operator new(size_t, void *p)
{
return p;
}
private:
// Private methods
ValueType calculateFutureQValue(const StateType state)
Expand Down

0 comments on commit 77ed790

Please sign in to comment.