Skip to content

Commit 89014bd

Browse files
committed
[compile] solve bazel compile warning info.
1 parent 1ca9486 commit 89014bd

6 files changed

Lines changed: 10 additions & 20 deletions

File tree

src/BUILD

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,10 @@ cc_library(
44
name = "CGraph",
55
srcs = glob(["**/*.cpp"]),
66
hdrs = glob(["**/*.h", "**/*.inl"]),
7+
copts = select({
8+
"@platforms//os:linux": ["-D_ENABLE_LIKELY_"],
9+
"@platforms//os:macos": ["-D_ENABLE_LIKELY_"],
10+
"//conditions:default": [],
11+
}),
712
visibility = ["//visibility:public"],
813
)

src/GraphCtrl/GraphParam/GParamManager.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ class GParamManager : public GParamObject,
5151

5252
/**
5353
* 获取所有的 GParam keys 信息
54-
* @param keys
5554
* @return
5655
*/
5756
std::vector<std::string> getKeys();

src/GraphCtrl/GraphParam/GParamManager.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ CStatus GParamManager::create(const std::string& key, CBool backtrace) {
2727
}
2828

2929
T* ptr = CGRAPH_SAFE_MALLOC_COBJECT(T)
30-
((GParamPtr)ptr)->backtrace_enable_ = backtrace;
3130
((GParamPtr)ptr)->key_ = key;
31+
((GParamPtr)ptr)->backtrace_enable_ = backtrace;
3232
params_map_.insert(std::pair<std::string, T*>(key, ptr));
3333
CGRAPH_FUNCTION_END
3434
}

src/GraphCtrl/GraphParam/GParamManagerWrapper.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ CGRAPH_NAMESPACE_BEGIN
7878
\
7979
/**
8080
* 获取所有的keys信息
81-
* @param keys
8281
* @return
8382
*/ \
8483
std::vector<std::string> getGParamKeys() { \
@@ -87,8 +86,7 @@ CGRAPH_NAMESPACE_BEGIN
8786
} \
8887
\
8988
/**
90-
* 获取所有的keys信息
91-
* @param keys
89+
* 获取所有被使用的keys信息
9290
* @return
9391
*/ \
9492
std::vector<std::string> getConcernedGParamKeys() const { \
@@ -110,7 +108,7 @@ private:
110108
return this; \
111109
} \
112110
\
113-
GParamPtrSet concerned_params_; /* 记录链路上使用过GParam信息 */ \
111+
GParamPtrSet concerned_params_; /* 记录链路上使用过GParam信息 */ \
114112
\
115113
protected: \
116114
\

src/GraphCtrl/GraphPipeline/GPipeline.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,10 @@ CGRAPH_NAMESPACE_BEGIN
2626
class GPipeline : public GPipelineObject,
2727
public CDescInfo {
2828
public:
29-
/**
30-
* 初始化pipeline信息
31-
* @return
32-
*/
3329
CStatus init() override;
3430

35-
/**
36-
* 执行pipeline信息
37-
* @return
38-
*/
3931
CStatus run() override;
4032

41-
/**
42-
* 逆初始化pipeline信息
43-
* @return
44-
*/
4533
CStatus destroy() override;
4634

4735
/**

tutorial/BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cc_library(
2-
name = "Tutorial_header",
2+
name = "tutorial_header",
33
srcs = glob(["MyGAspect/**/*.h",
44
"MyGCondition/**/*.h",
55
"MyGDaemon/**/*.h",
@@ -46,7 +46,7 @@ CGRAPH_TUTORIAL_LIST = [
4646
name = "%s" % tutorial_name,
4747
srcs = ["%s.cpp" % tutorial_name],
4848
copts = ["-Isrc/"],
49-
deps = [":Tutorial_header","//src:CGraph"],
49+
deps = [":tutorial_header","//src:CGraph"],
5050
)
5151
for tutorial_name in CGRAPH_TUTORIAL_LIST
5252
]

0 commit comments

Comments
 (0)