Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Virtual Acoustics Plugin
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LuFG VR VIS
VR-Group
Unreal-Development
Plugins
Virtual Acoustics Plugin
Commits
57f7d5eb
Commit
57f7d5eb
authored
2 weeks ago
by
cos-erm
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Raw to unique pointer - allows for newer and older dll versions"
This reverts commit
16aebf1d
.
parent
16aebf1d
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/VAPlugin/Private/VAPlugin.cpp
+4
-28
4 additions, 28 deletions
Source/VAPlugin/Private/VAPlugin.cpp
Source/VAPlugin/Private/VAPlugin.h
+2
-2
2 additions, 2 deletions
Source/VAPlugin/Private/VAPlugin.h
with
6 additions
and
30 deletions
Source/VAPlugin/Private/VAPlugin.cpp
+
4
−
28
View file @
57f7d5eb
...
@@ -59,8 +59,8 @@ bool FVAPlugin::bUseVA = true;
...
@@ -59,8 +59,8 @@ bool FVAPlugin::bUseVA = true;
bool
FVAPlugin
::
bDebugMode
=
true
;
bool
FVAPlugin
::
bDebugMode
=
true
;
// Interface Classes to Server
// Interface Classes to Server
std
::
unique_ptr
<
IVANetClient
>
FVAPlugin
::
VANetClient
;
IVANetClient
*
FVAPlugin
::
VANetClient
;
std
::
unique_ptr
<
IVAInterface
>
FVAPlugin
::
VAServer
;
IVAInterface
*
FVAPlugin
::
VAServer
;
// Link to the current receiver actor
// Link to the current receiver actor
AVAReceiverActor
*
FVAPlugin
::
ReceiverActor
=
nullptr
;
AVAReceiverActor
*
FVAPlugin
::
ReceiverActor
=
nullptr
;
...
@@ -293,16 +293,7 @@ bool FVAPlugin::ConnectServer(const FString HostF, const int Port)
...
@@ -293,16 +293,7 @@ bool FVAPlugin::ConnectServer(const FString HostF, const int Port)
FVAUtils
::
LogStuff
(
"[FVAPlugin::ConnectServer()]: Connecting to VAServer. Be sure to have it switched on"
,
false
);
FVAUtils
::
LogStuff
(
"[FVAPlugin::ConnectServer()]: Connecting to VAServer. Be sure to have it switched on"
,
false
);
try
try
{
{
VANetClient
=
[]()
{
VANetClient
=
IVANetClient
::
Create
();
if
constexpr
(
std
::
is_same_v
<
decltype
(
IVANetClient
::
Create
()),
std
::
unique_ptr
<
IVANetClient
>>
)
{
// New dll (>= 2025) with unique pointer
return
IVANetClient
::
Create
();
}
else
{
// Old dll with raw pointer -> convert to unique pointer
return
std
::
unique_ptr
<
IVANetClient
>
{
IVANetClient
::
Create
()};
}
}();
const
std
::
string
HostS
(
TCHAR_TO_UTF8
(
*
HostF
));
const
std
::
string
HostS
(
TCHAR_TO_UTF8
(
*
HostF
));
VANetClient
->
Initialize
(
HostS
,
Port
);
VANetClient
->
Initialize
(
HostS
,
Port
);
...
@@ -313,22 +304,7 @@ bool FVAPlugin::ConnectServer(const FString HostF, const int Port)
...
@@ -313,22 +304,7 @@ bool FVAPlugin::ConnectServer(const FString HostF, const int Port)
return
false
;
return
false
;
}
}
VAServer
=
[]()
->
std
::
unique_ptr
<
IVAInterface
>
{
VAServer
=
VANetClient
->
GetCoreInstance
();
using
IVANetInstance
=
decltype
(
std
::
declval
<
IVANetClient
>
());
if
constexpr
(
std
::
is_same_v
<
decltype
(
std
::
declval
<
IVANetInstance
>
().
GetCoreInstance
()),
std
::
unique_ptr
<
IVAInterface
>
>
)
{
// New dll (>= 2025)
return
std
::
move
(
VANetClient
->
GetCoreInstance
());
}
else
{
// Old dll
return
std
::
unique_ptr
<
IVAInterface
>
{
VANetClient
->
GetCoreInstance
()};
}
}();
VAServer
->
Reset
();
VAServer
->
Reset
();
}
}
catch
(
CVAException
&
e
)
catch
(
CVAException
&
e
)
...
...
This diff is collapsed.
Click to expand it.
Source/VAPlugin/Private/VAPlugin.h
+
2
−
2
View file @
57f7d5eb
...
@@ -179,8 +179,8 @@ protected:
...
@@ -179,8 +179,8 @@ protected:
static
bool
bDebugMode
;
// bool if is in Debug Mode
static
bool
bDebugMode
;
// bool if is in Debug Mode
// Interface Classes to Server
// Interface Classes to Server
static
std
::
unique_ptr
<
IVANetClient
>
VANetClient
;
// VA Net Client
static
IVANetClient
*
VANetClient
;
// VA Net Client
static
std
::
unique_ptr
<
IVAInterface
>
VAServer
;
// VA Server Interface
static
IVAInterface
*
VAServer
;
// VA Server Interface
// Link to the current receiver actor
// Link to the current receiver actor
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment