First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 63773
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Games <games@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Peter `MathFox' Roozemaal <mathfox@xs4all.nl>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 63773 depends on: Show dependency tree
Show dependency graph
Bug 63773 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-09-12 07:02 0000
emerge pingus:

if g++ -DHAVE_CONFIG_H -I. -I. -I..   -I/usr/include/libxml2  -O2 -I//usr/include/clanlib-0.6.5 -MT story_screen.o -MD -MP -MF ".deps/story_screen.Tpo" \
  -c -o story_screen.o `test -f 'story_screen.cxx' || echo './'`story_screen.cxx; \
then mv ".deps/story_screen.Tpo" ".deps/story_screen.Po"; \
else rm -f ".deps/story_screen.Tpo"; exit 1; \
fi
story_screen.cxx: In member function `virtual void
   StoryScreenComponent::update(float)':
story_screen.cxx:146: error: no matching function for call to `min(size_t,
   unsigned int&)'
make[3]: *** [story_screen.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/var/tmp/portage/pingus-0.6.0-r1/work/pingus-0.6.0/src'

It must have something to do with amd64 where size_t is 64 bits and int is 32 bits.

------- Comment #1 From Peter `MathFox' Roozemaal 2004-09-12 07:22:23 0000 -------
BTW, here is a patch that fixes the problem:

--- /root/story_screen.cxx.old  2004-09-12 16:18:41.596208118 +0200
+++ story_screen.cxx    2004-09-12 16:18:54.918143962 +0200
@@ -142,7 +142,7 @@
  
   if (!page_displayed_completly)
     {
-      unsigned int len = static_cast<unsigned int>(20.0f * time_passed);
+      size_t len = static_cast<size_t>(20.0f * time_passed);
       display_text = current_page.text.substr(0, Math::min(current_page.text.length(), len));
  
       if (current_page.text.length() < len)

------- Comment #2 From Mr. Bones. 2004-09-12 19:24:34 0000 -------
Ok...fixed in cvs.  Thanks for the patch and bug report.

First Last Prev Next    No search results available      Search page      Enter new bug