Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant moves in return statements #1090

Merged
merged 3 commits into from
Feb 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/bm/bm_sim/queueing.h
Original file line number Diff line number Diff line change
Expand Up @@ -777,15 +777,15 @@ class QueueingLogicPriRL {
Function for_each_q(size_t queue_id, Function fn) {
auto &q_info = get_queue(queue_id);
for (auto &q_info_pri : q_info) fn(q_info_pri);
return std::move(fn);
return fn;
}

template <typename Function>
Function for_one_q(size_t queue_id, size_t priority, Function fn) {
auto &q_info = get_queue(queue_id);
auto &q_info_pri = q_info.at(priority);
fn(q_info_pri);
return std::move(fn);
return fn;
}

struct SetCapacityFn {
Expand Down
10 changes: 9 additions & 1 deletion targets/simple_switch_grpc/tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
# Ensures that gtest has been built
SUBDIRS = ../../../third_party

# for deprecated Protobuf fields
AM_CXXFLAGS += -Wno-error=deprecated-declarations

AM_CPPFLAGS += \
-isystem $(top_srcdir)/../../third_party/gtest/include \
-I$(top_srcdir) \
Expand Down Expand Up @@ -31,6 +34,7 @@ check_PROGRAMS = example test_gtest
common_source = utils.h utils.cpp base_test.h base_test.cpp

example_SOURCES = example.cpp utils.h utils.cpp

test_gtest_SOURCES = \
$(common_source) main.cpp \
test_basic.cpp test_grpc_dp.cpp test_packet_io.cpp \
Expand All @@ -45,7 +49,11 @@ if WITH_SYSREPO
test_gtest_SOURCES += test_gnmi.cpp
endif

LDADD = \
example_LDADD = \
-lpiprotogrpc -lpiprotobuf \
$(PROTOBUF_LIBS) $(GRPC_LIBS)

test_gtest_LDADD = \
$(top_builddir)/libsimple_switch_grpc.la \
$(top_builddir)/../simple_switch/libsimpleswitch.la \
-lpiprotogrpc -lpiprotobuf \
Expand Down