Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
magicseteditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
magicseteditor
Commits
41f5fcf4
Commit
41f5fcf4
authored
Jan 14, 2009
by
coppro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bunch of linker errors preventing optimized compile on Linux.
parent
5cb0f740
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
15 deletions
+33
-15
src/data/field/choice.cpp
src/data/field/choice.cpp
+3
-0
src/data/pack.cpp
src/data/pack.cpp
+5
-5
src/data/set.cpp
src/data/set.cpp
+2
-1
src/script/functions/basic.cpp
src/script/functions/basic.cpp
+1
-1
src/script/value.hpp
src/script/value.hpp
+11
-8
src/util/reflect.hpp
src/util/reflect.hpp
+11
-0
No files found.
src/data/field/choice.cpp
View file @
41f5fcf4
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#include <util/prec.hpp>
#include <util/prec.hpp>
#include <data/field/choice.hpp>
#include <data/field/choice.hpp>
#include <util/io/package.hpp>
#include <util/io/package.hpp>
#include <util/defaultable.hpp>
#include <wx/imaglist.h>
#include <wx/imaglist.h>
DECLARE_TYPEOF_COLLECTION
(
ChoiceField
::
ChoiceP
);
DECLARE_TYPEOF_COLLECTION
(
ChoiceField
::
ChoiceP
);
...
@@ -303,3 +304,5 @@ bool ChoiceValue::update(Context& ctx) {
...
@@ -303,3 +304,5 @@ bool ChoiceValue::update(Context& ctx) {
IMPLEMENT_REFLECTION_NAMELESS
(
ChoiceValue
)
{
IMPLEMENT_REFLECTION_NAMELESS
(
ChoiceValue
)
{
if
(
fieldP
->
save_value
||
tag
.
scripting
()
||
tag
.
reading
())
REFLECT_NAMELESS
(
value
);
if
(
fieldP
->
save_value
||
tag
.
scripting
()
||
tag
.
reading
())
REFLECT_NAMELESS
(
value
);
}
}
INSTANTIATE_REFLECTION_NAMELESS
(
ChoiceValue
)
src/data/pack.cpp
View file @
41f5fcf4
...
@@ -419,7 +419,7 @@ void PackInstance::generate(vector<CardP>* out) {
...
@@ -419,7 +419,7 @@ void PackInstance::generate(vector<CardP>* out) {
if
(
pack_type
.
select
==
SELECT_EQUAL_PROPORTIONAL
)
{
if
(
pack_type
.
select
==
SELECT_EQUAL_PROPORTIONAL
)
{
wi
.
weight
=
item
->
weight
*
parent
.
get
(
item
->
name
).
total_weight
;
wi
.
weight
=
item
->
weight
*
parent
.
get
(
item
->
name
).
total_weight
;
}
else
if
(
pack_type
.
select
==
SELECT_EQUAL_NONEMPTY
)
{
}
else
if
(
pack_type
.
select
==
SELECT_EQUAL_NONEMPTY
)
{
wi
.
weight
=
parent
.
get
(
item
->
name
).
total_weight
>
0
?
item
->
weight
:
0
;
wi
.
weight
=
parent
.
get
(
item
->
name
).
total_weight
>
0
?
static_cast
<
int
>
(
item
->
weight
)
:
0
;
}
else
{
}
else
{
wi
.
weight
=
item
->
weight
;
wi
.
weight
=
item
->
weight
;
}
}
...
...
src/data/set.cpp
View file @
41f5fcf4
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
#include <data/field/information.hpp>
#include <data/field/information.hpp>
#include <util/tagged_string.hpp> // for 0.2.7 fix
#include <util/tagged_string.hpp> // for 0.2.7 fix
#include <util/order_cache.hpp>
#include <util/order_cache.hpp>
#include <util/delayed_index_maps.hpp>
#include <script/script_manager.hpp>
#include <script/script_manager.hpp>
#include <script/profiler.hpp>
#include <script/profiler.hpp>
#include <wx/sstream.h>
#include <wx/sstream.h>
...
...
src/script/functions/basic.cpp
View file @
41f5fcf4
...
@@ -63,7 +63,7 @@ String format_input(const String& format, const ScriptValue& input) {
...
@@ -63,7 +63,7 @@ String format_input(const String& format, const ScriptValue& input) {
// determine type of input
// determine type of input
ScriptType
type
=
input
.
type
();
ScriptType
type
=
input
.
type
();
if
(
type
==
SCRIPT_DATETIME
)
{
if
(
type
==
SCRIPT_DATETIME
)
{
return
static_cast
<
wxDateTime
>
(
input
).
Format
(
format
.
c_str
());
input
.
toDateTime
(
).
Format
(
format
.
c_str
());
}
else
{
}
else
{
// determine type expected by format string
// determine type expected by format string
String
fmt
=
_
(
"%"
)
+
replace_all
(
format
,
_
(
"%"
),
_
(
""
));
String
fmt
=
_
(
"%"
)
+
replace_all
(
format
,
_
(
"%"
),
_
(
""
));
...
...
src/script/value.hpp
View file @
41f5fcf4
...
@@ -78,6 +78,9 @@ class ScriptValue : public IntrusivePtrBaseWithDelete {
...
@@ -78,6 +78,9 @@ class ScriptValue : public IntrusivePtrBaseWithDelete {
/** This is sometimes necessary, because wxString has an int constructor,
/** This is sometimes necessary, because wxString has an int constructor,
* which confuses gcc. */
* which confuses gcc. */
inline
String
toString
()
const
{
return
*
this
;
}
inline
String
toString
()
const
{
return
*
this
;
}
/// Explicit overload to convert to a wxDateTime
/** Overload resolution is sometimes confused by other conversions */
inline
wxDateTime
toDateTime
()
const
{
return
*
this
;
}
/// Convert this value to an image
/// Convert this value to an image
virtual
GeneratedImageP
toImage
(
const
ScriptValueP
&
thisP
)
const
;
virtual
GeneratedImageP
toImage
(
const
ScriptValueP
&
thisP
)
const
;
...
...
src/util/reflect.hpp
View file @
41f5fcf4
...
@@ -149,6 +149,17 @@
...
@@ -149,6 +149,17 @@
/// Reflect a variable under the given name
/// Reflect a variable under the given name
#define REFLECT_NO_SCRIPT_N(name, var) tag.handleNoScript(_(name), var)
#define REFLECT_NO_SCRIPT_N(name, var) tag.handleNoScript(_(name), var)
/// Explicitly instantiate reflection; this is occasionally required.
#define INSTANTIATE_REFLECTION(Class) \
template
void
Class
::
reflect_impl
<
Reader
>
(
Reader
&
);
\
template
void
Class
::
reflect_impl
<
Writer
>
(
Writer
&
);
\
template
void
Class
::
reflect_impl
<
GetMember
>
(
GetMember
&
);
#define INSTANTIATE_REFLECTION_NAMELESS(Class) \
template
void
Class
::
reflect_impl
<
Reader
>
(
Reader
&
);
\
template
void
Class
::
reflect_impl
<
Writer
>
(
Writer
&
);
\
template
void
Class
::
reflect_impl
<
GetDefaultMember
>
(
GetDefaultMember
&
);
// ----------------------------------------------------------------------------- : Reflecting enums
// ----------------------------------------------------------------------------- : Reflecting enums
/// Implement the refelection of a enumeration type Enum
/// Implement the refelection of a enumeration type Enum
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment