Skip to content

Commit 626bf89

Browse files
authored
Ensure samples comply with March release docs and C++11 (#592)
1 parent b4c00b2 commit 626bf89

File tree

8 files changed

+15
-16
lines changed

8 files changed

+15
-16
lines changed

production/examples/hello/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ set_target_properties(hello PROPERTIES COMPILE_FLAGS ${GAIA_COMPILE_FLAGS})
4747
set_target_properties(hello PROPERTIES LINK_FLAGS ${GAIA_LINK_FLAGS})
4848
target_include_directories(hello PRIVATE ${GAIA_INC})
4949
target_include_directories(hello PRIVATE ${PROJECT_BINARY_DIR})
50-
target_link_libraries(hello PRIVATE rt pthread gaia)
50+
target_link_libraries(hello PRIVATE gaia rt pthread)

production/examples/hello/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ select * from hello_fdw.greetings;
1818
You can also build this code with the `cmake` and `make` tools, by using the included CMakeLists.txt file. Before doing this, you should specify the clang compiler by setting the following variables in your environment:
1919

2020
```
21-
export CC=/usr/bin/clang-8
22-
export CXX=/usr/bin/clang++-8
21+
export CC=/usr/bin/clang-10
22+
export CXX=/usr/bin/clang++-10
2323
```
2424

2525
The steps for the cmake build are:

production/examples/hello/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77

88
gaiac -g hello.ddl
99

10-
gaiat hello.ruleset -output hello_ruleset.cpp -- -I /usr/lib/clang/8/include/ -I /opt/gaia/include/
10+
gaiat hello.ruleset -output hello_ruleset.cpp -- -I /usr/lib/clang/10/include/ -I /opt/gaia/include/
1111

12-
clang++-8 hello.cpp hello_ruleset.cpp /usr/local/lib/libgaia.so -I /opt/gaia/include -Wl,-rpath,/usr/local/lib -lpthread -o hello
12+
clang++-10 hello.cpp hello_ruleset.cpp /usr/local/lib/libgaia.so -I /opt/gaia/include -Wl,-rpath,/usr/local/lib -lpthread -o hello

production/examples/hello/hello.ddl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
create table if not exists names
77
(
8-
name string active
8+
name string
99
);
1010

1111
create table if not exists greetings
1212
(
13-
greeting string active
13+
greeting string
1414
);

production/examples/incubator/incubator.ddl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55

66
create table if not exists incubator (
77
name string,
8-
is_on bool active,
9-
min_temp float active,
10-
max_temp float active
8+
is_on bool,
9+
min_temp float,
10+
max_temp float
1111
);
1212

1313
create table if not exists sensor (
1414
name string,
1515
timestamp uint64,
16-
value float active,
16+
value float,
1717
references incubator
1818
);
1919

2020
create table if not exists actuator (
2121
name string,
2222
timestamp uint64,
23-
value float active,
23+
value float,
2424
references incubator
2525
);

production/examples/incubator/incubator.ruleset

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ ruleset incubator_ruleset
3737
}
3838

3939
// Rule 2: Turn off all the fans if the incubator is powered down.
40-
OnUpdate(incubator.is_on)
4140
{
42-
if (!incubator.is_on)
41+
if (!@incubator.is_on)
4342
{
4443
actuator.value = 0;
4544
actuator.timestamp = g_timestamp;

production/inc/gaia/direct_access/edc_expressions.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class expression_t
166166
template <typename T_value>
167167
expression_decorator_t<T_class> contains(expression_decorator_t<T_value> predicate);
168168

169-
template <typename T_value, typename = std::enable_if<std::is_base_of_v<edc_base_t, T_value>>>
169+
template <typename T_value, typename = std::enable_if<std::is_base_of<edc_base_t, T_value>::value>>
170170
expression_decorator_t<T_class> contains(const T_value& object);
171171

172172
expression_decorator_t<T_class> empty();

production/inc/gaia/direct_access/edc_object.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ struct edc_object_t : edc_base_t
167167
template <typename T_type>
168168
static edc_vector_t<T_type> to_edc_vector(const flatbuffers::Vector<T_type>* vector_ptr)
169169
{
170-
return edc_vector_t(vector_ptr);
170+
return edc_vector_t<T_type>(vector_ptr);
171171
};
172172
};
173173

0 commit comments

Comments
 (0)