Skip to content

Commit

Permalink
[code] solution compiles under vs2019
Browse files Browse the repository at this point in the history
Former-commit-id: a89fb3bcad91b6e93633e87c0ca0e9089fff3ab5
  • Loading branch information
marcinklimek committed Jul 8, 2021
1 parent 0c4af3c commit 1c3d3ce
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 30 deletions.
5 changes: 3 additions & 2 deletions addons/ofxGui/src/JsonConfigParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ bool JsonConfigParser::_parse(const ofJson &config, const string &name, std::str

if (config.find(name) != config.end()) {
ofJson content = config[name];
if(content.is_string()){
val = content;
if(content.is_string())
{
val = content.get<std::string>();
return true;
}else {
ofLogError("JsonConfigParser::parse") << "Could not parse " << config << " to string.";
Expand Down
6 changes: 3 additions & 3 deletions addons/ofxGui/src/ofxGuiElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ void ofxGuiElement::_setConfig(const ofJson &config){
if(_config.find("margin") != _config.end()){
std::string val = "";
if(_config["margin"].is_string()){
val = _config["margin"];
val = _config["margin"].get<std::string>();
}else{
val = ofToString(_config["margin"]);
}
Expand Down Expand Up @@ -298,7 +298,7 @@ void ofxGuiElement::_setConfig(const ofJson &config){
if(_config.find("padding") != _config.end()){
std::string val = "";
if(_config["padding"].is_string()){
val = _config["padding"];
val = _config["padding"].get<std::string>();
}else{
val = ofToString(_config["padding"]);
}
Expand Down Expand Up @@ -365,7 +365,7 @@ void ofxGuiElement::_setConfig(const ofJson &config){
if(it.value().is_string() || it.value().is_number() || it.value().is_boolean()){
std::string value;
if(it.value().is_string()){
value = it.value();
value = it.value().get<std::string>();
}else {
value = ofToString(it.value());
}
Expand Down
16 changes: 8 additions & 8 deletions apps/hec/cc/bin/data/cc-settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<sensing_window_width>0.529296875</sensing_window_width>
<sensing_window_height>0.568396211</sensing_window_height>
</analysis>
<SensingWindow-x-0>0.000000000</SensingWindow-x-0>
<SensingWindow-y-0>0.000000000</SensingWindow-y-0>
<SensingWindow-x-1>0.994140625</SensingWindow-x-1>
<SensingWindow-y-1>0.000000000</SensingWindow-y-1>
<SensingWindow-x-2>0.998046875</SensingWindow-x-2>
<SensingWindow-y-2>0.995283008</SensingWindow-y-2>
<SensingWindow-x-3>0.000000000</SensingWindow-x-3>
<SensingWindow-y-3>1.000000000</SensingWindow-y-3>
<SensingWindow-x-0>0.031250000</SensingWindow-x-0>
<SensingWindow-y-0>0.077830188</SensingWindow-y-0>
<SensingWindow-x-1>0.990234375</SensingWindow-x-1>
<SensingWindow-y-1>0.063679248</SensingWindow-y-1>
<SensingWindow-x-2>0.976562500</SensingWindow-x-2>
<SensingWindow-y-2>0.905660391</SensingWindow-y-2>
<SensingWindow-x-3>0.031250000</SensingWindow-x-3>
<SensingWindow-y-3>0.905660391</SensingWindow-y-3>
30 changes: 15 additions & 15 deletions apps/hec/cc/bin/data/settings.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<?xml version="1.0"?>
<Parameters>
<colormap>117</colormap>
<tolerance>0.0006</tolerance>
<smoothing>7</smoothing>
<blur_amount>0</blur_amount>
<erosion_open>0</erosion_open>
<erosion_close>0</erosion_close>
<dillate>0</dillate>
<blur_amount_2>0</blur_amount_2>
<erosion_open_2>1</erosion_open_2>
<erosion_close_2>0</erosion_close_2>
<dillate_2>0</dillate_2>
<colormap>42</colormap>
<tolerance>0.0020098</tolerance>
<smoothing>4</smoothing>
<blur_amount>1</blur_amount>
<erosion_open>1</erosion_open>
<erosion_close>1</erosion_close>
<dillate>1</dillate>
<blur_amount_2>1</blur_amount_2>
<erosion_open_2>4</erosion_open_2>
<erosion_close_2>4</erosion_close_2>
<dillate_2>4</dillate_2>
<area_min>500</area_min>
<area_max>5e+06</area_max>
<use_convex>0</use_convex>
<near>0</near>
<far>8000</far>
<near>705</near>
<far>1647</far>
<Reset_Background>0</Reset_Background>
<Learning_Time>30</Learning_Time>
<Threshold_Value>10</Threshold_Value>
<Threshold_Value>6.25</Threshold_Value>
<Parameters />
<learing_rate>0.99</learing_rate>
<reset_Background>0</reset_Background>
<reset_Background_time>5</reset_Background_time>
<epsilon>100</epsilon>
<script>0</script>
<script>1</script>
</Parameters>
2 changes: 1 addition & 1 deletion apps/hec/cc/cc.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ copy /Y "$(OF_ROOT)build\bin\luaBox2D_$(Platform)_$(Configuration)"
<FloatingPointModel>Fast</FloatingPointModel>
<Optimization>Full</Optimization>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<LanguageStandard>stdcpplatest</LanguageStandard>
<LanguageStandard>stdcpp14</LanguageStandard>
</ClCompile>
<Link>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
Expand Down
2 changes: 1 addition & 1 deletion libs/openFrameworks/utils/ofConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ std::unique_ptr<T> make_unique(Args&&... args) {
}

// marcin(08.07.2021) - c++>=17 has already namespace based on boost

// commented out
namespace std {
namespace filesystem = boost::filesystem;
}
Expand Down
1 change: 1 addition & 0 deletions libs/openFrameworks/utils/ofUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <iomanip> //for setprecision
#include <algorithm>
#include <sstream>
#include <filesystem>


/// \section Elapsed Time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<LanguageStandard>stdcpp14</LanguageStandard>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
Expand Down

0 comments on commit 1c3d3ce

Please sign in to comment.